:orphan:
# MatSeqAIJHIPSPARSEGetArrayRead
gives read-only access to the array where the device data for a `MATSEQAIJHIPSPARSE` matrix is stored 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSeqAIJHIPSPARSEGetArrayRead(Mat A, const PetscScalar **a)
```
Not Collective


## Input Parameter

- ***A -*** a `MATSEQAIJHIPSPARSE` matrix



## Output Parameter

- ***a -*** pointer to the device data





## Note
May trigger host-device copies if the up-to-date matrix data is on host


## See Also
 [](ch_matrices), `Mat`, `MatSeqAIJHIPSPARSEGetArray()`, `MatSeqAIJHIPSPARSEGetArrayWrite()`, `MatSeqAIJHIPSPARSERestoreArrayRead()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp#MatSeqAIJHIPSPARSEGetArrayRead">src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cpp</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.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)  
