PETSC_EXTERN PetscErrorCode VecCUDAGetArrayReadWrite(Vec v, PetscScalar **a)This function has semantics similar to VecGetArray(): the pointer Many brreturned by this function points to a consistent view of the vector Many brdata. This may involve a copy operation of data from the host to the Many brdevice if the data on the device is out of date. If the device Many brmemory hasn't been allocated previously it will be allocated as part Many brof this function call. VecCUDAGetArrayReadWrite() assumes that Many brthe user will modify the vector data. This is similar to Many brintent(inout) in fortran. Many br
The CUDA device pointer has to be released by calling Many brVecCUDARestoreArrayReadWrite(). Upon restoring the vector data Many brthe data on the host will be marked as out of date. A subsequent Many braccess of the host data will thus incur a data transfer from the Many brdevice to the host. Many br
Many br
Level:intermediate
Location:src/vec/vec/impls/seq/seqcuda/veccuda2.cu
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages