VecHIPGetArrayRead#

Provides read access to the HIP buffer inside a vector.

Synopsis#

#include <petscvec.h> 
PetscErrorCode VecHIPGetArrayRead(Vec v, const PetscScalar **a)

Not Collective; Asynchronous; No Fortran Support

Input Parameter#

  • v - the vector

Output Parameter#

  • a - the HIP pointer.

Notes#

See VecHIPGetArray() 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 VecHIPRestoreArrayRead(). 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, VecHIPRestoreArrayRead(), VecHIPGetArray(), VecHIPGetArrayWrite(), VecGetArray(), VecGetArrayRead()

Level#

intermediate

Location#

src/vec/vec/impls/seq/cupm/hip/vecseqcupm.hip.cpp


Edit on GitLab

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages