petsc-3.14.6 2021-03-30
VecCreateSeqViennaCLWithArray
Creates a viennacl sequential array-style vector, where the user provides the array space to store the vector values.
Synopsis
#include "petscvec.h"
PETSC_EXTERN PetscErrorCode VecCreateSeqViennaCLWithArray(MPI_Comm comm,PetscInt bs,PetscInt n,const ViennaCLVector* array,Vec *V)
Collective
Input Parameter
| comm | - the communicator, should be PETSC_COMM_SELF
|
| bs | - the block size
|
| n | - the vector length
|
| array | - viennacl array where the vector elements are to be stored.
|
Output Parameter
Notes
Use VecDuplicate() or VecDuplicateVecs() to form additional vectors of the
same type as an existing vector.
If the user-provided array is NULL, then VecViennaCLPlaceArray() can be used
at a later stage to SET the array for storing the vector values.
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
VecCreateMPIViennaCLWithArray(), VecCreate(), VecDuplicate(), VecDuplicateVecs(),
VecCreateGhost(), VecCreateSeq(), VecCUDAPlaceArray(), VecCreateSeqWithArray(),
VecCreateMPIWithArray()
Level
intermediate
Location
src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages