VecCreateSeqKokkosWithArray#

Creates a Kokkos sequential array-style vector, where the user provides the array space to store the vector values. The array provided must be a device array.

Synopsis#

Collective

Input Parameters#

  • comm - the communicator, should be PETSC_COMM_SELF

  • bs - the block size

  • n - the vector length

  • array - device memory where the vector elements are to be stored.

Output Parameter#

  • v - the vector

Notes#

Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the same type as an existing vector.

PETSc does NOT free the array when the vector is destroyed via VecDestroy(). The user should not free the array until the vector is destroyed.

See Also#

VecCreateMPICUDAWithArray(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateGhost(), VecCreateSeq(), VecCreateSeqWithArray(), VecCreateMPIWithArray()

Level#

intermediate

Location#

src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx


Edit on GitLab

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages