VecCUDAGetArrayRead#
Provides read access to the CUDA buffer inside a vector.
Synopsis#
#include <petscvec.h>
PetscErrorCode VecCUDAGetArrayRead(Vec v, const PetscScalar **a)
Not Collective; Asynchronous; No Fortran Support
Input Parameter#
v - the vector
Output Parameter#
a - the CUDA pointer.
Notes#
See VecCUDAGetArray()
for data movement semantics of this function.
This function assumes that the user will not modify the vector data. This is analgogous to intent(in) in Fortran.
The device pointer must be restored by calling VecCUDARestoreArrayRead()
. If the data on the
host side was previously up to date it will remain so, i.e. data on both the device and the
host is up to date. Accessing data on the host side does not incur a device to host data
transfer.
See Also#
Vectors and Parallel Data, VecCUDARestoreArrayRead()
, VecCUDAGetArray()
, VecCUDAGetArrayWrite()
, VecGetArray()
,
VecGetArrayRead()
Level#
intermediate
Location#
src/vec/vec/impls/seq/cupm/cuda/vecseqcupm.cu
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages