:orphan: # VecHIPGetArrayRead Provides read access to the HIP buffer inside a vector. ## Synopsis ``` #include 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 [](ch_vectors), `VecHIPRestoreArrayRead()`, `VecHIPGetArray()`, `VecHIPGetArrayWrite()`, `VecGetArray()`, `VecGetArrayRead()` ## Level intermediate ## Location src/vec/vec/impls/seq/cupm/hip/vecseqcupm.hip.cpp --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/impls/seq/cupm/hip/vecseqcupm.hip.cpp) [Index of all Vec routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)