:orphan: # MATAIJHIPSPARSE A matrix type to be used for sparse matrices; it is as same as `MATMPIAIJHIPSPARSE`. A matrix type type whose data resides on GPUs. These matrices can be in either CSR, ELL, or Hybrid format. All matrix calculations are performed on AMD GPUs using the HIPSPARSE library. This matrix type is identical to `MATSEQAIJHIPSPARSE` when constructed with a single process communicator, and `MATMPIAIJHIPSPARSE` otherwise. As a result, for single process communicators, `MatSeqAIJSetPreallocation()` is supported, and similarly `MatMPIAIJSetPreallocation()` is supported for communicators controlling multiple processes. It is recommended that you call both of the above preallocation routines for simplicity. ## Options Database Keys - ***-mat_type mpiaijhipsparse -*** sets the matrix type to `MATMPIAIJHIPSPARSE` - ***-mat_hipsparse_storage_format csr -*** sets the storage format of diagonal and off-diagonal matrices. Other options include ell (ellpack) or hyb (hybrid). - ***-mat_hipsparse_mult_diag_storage_format csr -*** sets the storage format of diagonal matrix. Other options include ell (ellpack) or hyb (hybrid). - ***-mat_hipsparse_mult_offdiag_storage_format csr -*** sets the storage format of off-diagonal matrix. Other options include ell (ellpack) or hyb (hybrid). ## See Also [](ch_matrices), `Mat`, `MatCreateAIJHIPSPARSE()`, `MATSEQAIJHIPSPARSE`, `MATMPIAIJHIPSPARSE`, `MatCreateSeqAIJHIPSPARSE()`, `MatHIPSPARSESetFormat()`, `MatHIPSPARSEStorageFormat`, `MatHIPSPARSEFormatOperation` ## Level beginner ## Location src/mat/impls/aij/mpi/mpihipsparse/mpiaijhipsparse.hip.cpp ## Examples src/ksp/ksp/tutorials/ex79.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/aij/mpi/mpihipsparse/mpiaijhipsparse.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)