petsc-3.7.3 2016-08-01
Report Typos and Errors

VecCUSPGetArrayReadWrite

Provides access to the CUSP vector inside a vector.

Synopsis

PETSC_EXTERN PetscErrorCode VecCUSPGetArrayReadWrite(Vec v, CUSPARRAY **a)
This function has semantics similar to VecGetArray(): the CUSP vector returned by this function points to a consistent view of the vector data. This may involve a copy operation of data from the host to the device if the data on the device is out of date. If the device memory hasn't been allocated previously it will be allocated as part of this function call. VecCUSPGetArrayReadWrite() assumes that the user will modify the vector data. This is similar to intent(inout) in fortran.

The CUSP device vector has to be released by calling VecCUSPRestoreArrayReadWrite(). Upon restoring the vector data the data on the host will be marked as out of date. A subsequent access of the host data will thus incur a data transfer from the device to the host.

Input Parameter

v -the vector

Output Parameter

a -the CUSP device vector
Fortran note: This function is not currently available from Fortran.

Fortran note

This function is not currently available from Fortran.

See Also

VecCUSPRestoreArrayReadWrite(), VecCUSPGetArrayRead(), VecCUSPGetArrayWrite(), VecGetArray(), VecGetArrayRead()

Level:intermediate
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