:orphan: # MatDenseHIPGetArrayRead Provides read-only access to the HIP buffer inside a `MATDENSEHIP` matrix. The array must be restored with `MatDenseHIPRestoreArrayRead()` when no longer needed. ## Synopsis ``` PetscErrorCode MatDenseHIPGetArrayRead(Mat A, const PetscScalar **a) ``` Not Collective ## Input Parameter - ***A -*** the matrix ## Output Parameter - ***a -*** the GPU array in column major order ## Note Data may be copied to the GPU due to operations done on the CPU. If you need write only access, use `MatDenseHIPGetArrayWrite()`. ## See Also `MATDENSEHIP`, `MatDenseHIPGetArray()`, `MatDenseHIPRestoreArray()`, `MatDenseHIPRestoreArrayWrite()`, `MatDenseHIPGetArrayWrite()`, `MatDenseHIPRestoreArrayRead()` ## Level developer ## Location src/mat/impls/dense/mpi/cupm/hip/matmpidensehip.hip.cpp --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/dense/mpi/cupm/hip/matmpidensehip.hip.cpp) [Index of all Mat routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)