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

VecCUSPGetArrayRead

Provides read access to the CUSP device vector inside a vector.

Synopsis

PETSC_EXTERN PetscErrorCode VecCUSPGetArrayRead(Vec v, CUSPARRAY **a)
This function is analogous to VecGetArrayRead(): The CUSP vector 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. VecCUSPGetArrayRead() assumes that the user Many brwill not modify the vector data. This is analogous to intent(in) in Many brFortran. Many br

The CUSP device vector has to be released by calling Many brVecCUSPRestoreArrayRead(). If the data on the host side was Many brpreviously up to date it will remain so, i.e. data on both the device Many brand the host is up to date. Accessing data on the host side does not Many brincur a device to host data transfer. Many br

Input Parameter

v -the vector Many br

Output Parameter

a -the CUSP device vector Many br

Fortran note

This function is not currently available from Fortran. Many br

Many br

See Also

VecCUSPRestoreArrayRead(), VecCUSPGetArrayReadWrite(), VecCUSPGetArrayWrite(), VecCUSPGetArrayReadWrite(), 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

Examples

src/snes/examples/tutorials/ex47cu.cu.html