PETSc version 3.17.5
Fix/Edit manual page

VecGetArrayReadAndMemType

Like VecGetArrayRead(), but if the input vector is a device vector, it will return a read-only device pointer. The returned pointer is guarenteed to point to up-to-date data. For host vectors, it functions as VecGetArrayRead().

Synopsis

#include "petscvec.h"   
PetscErrorCode VecGetArrayReadAndMemType(Vec x,const PetscScalar **a,PetscMemType *mtype)
Not Collective

Input Parameter

x - the vector

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(), VecGetArrayAndMemType(), VecGetArrayWriteAndMemType(), 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