petsc-3.7.1 2016-05-15
Report Typos and Errors

VecCUSPGetCUDAArrayWrite

Provides write access to the CUDA buffer inside a vector.

Synopsis

PETSC_EXTERN PetscErrorCode VecCUSPGetCUDAArrayWrite(Vec v, PetscScalar **a)
The data pointed to by the device pointer is uninitialized. The user Many brmay not read from this data. Furthermore, the entire array needs to Many brbe filled by the user to obtain well-defined behaviour. The device Many brmemory will be allocated by this function if it hasn't been allocated Many brpreviously. This is analogous to intent(out) in Fortran. Many br

The device pointer needs to be released with Many brVecCUSPRestoreCUDAArrayWrite(). When the pointer is released the Many brhost data of the vector is marked as out of data. Subsequent access Many brof the host data with e.g. VecGetArray() incurs a device to host data Many brtransfer. Many br

Input Parameter

v -the vector Many br

Output Parameter

a -the CUDA pointer Many br

Fortran note

This function is not currently available from Fortran. Many br

Many br

See Also

VecCUSPRestoreCUDAArrayWrite(), VecCUSPGetCUDAArrayReadWrite(), VecCUSPGetCUDAArrayWrite(), VecCUSPGetArrayReadWrite(), VecCUSPGetArrayRead(), VecCUSPGetArrayWrite(), VecGetArray(), VecGetArrayRead()

Level:advanced
Location:
src/vec/vec/impls/seq/seqcusp/veccusp2.cu
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages