PETSc version 3.15.5
VecGetArrayReadAndMemType
Like VecGetArrayRead(), but if this is a CUDA vector and it is currently offloaded to GPU, the returned pointer will be a GPU pointer to the GPU memory that contains this processor's portion of the vector data. Otherwise, it functions as VecGetArrayRead().
Synopsis
#include "petscvec.h"
PetscErrorCode VecGetArrayReadAndMemType(Vec x,const PetscScalar **a,PetscMemType *mtype)
Not Collective
Input Parameter
Output Parameters
| a | - the array
|
| mtype | - memory type of the array
|
Notes
The array must be returned using a matching call to VecRestoreArrayReadAndMemType().
See Also
VecRestoreArrayReadAndMemType(), VecGetArray(), VecRestoreArray(), VecGetArrayPair(), VecRestoreArrayPair(), VecGetArrayAndMemType()
Level
beginner
Location
src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages