PETSc version 3.17.5
MatSeqAIJGetCSRAndMemType
Get the CSR arrays and the memory type of the SEQAIJ matrix
Synopsis
#include "petscmat.h"
PetscErrorCode MatSeqAIJGetCSRAndMemType(Mat mat,const PetscInt **i,const PetscInt **j,PetscScalar **a,PetscMemType *mtype)
Not Collective
Input Parameter
| mat | - a matrix of type MATSEQAIJ or its subclasses
|
Output Parameters
| i | - row map array of the matrix
|
| j | - column index array of the matrix
|
| a | - data array of the matrix
|
| memtype | - memory type of the arrays
|
Notes
Any of the output parameters can be NULL, in which case the corresponding value is not returned.
If mat is a device matrix, the arrays are on the device. Otherwise, they are on the host.
One can call this routine on a preallocated but not assembled matrix to just get the memory of the CSR underneath the matrix.
If the matrix is assembled, the data array 'a' is guaranteed to have the latest values of the matrix.
See Also
MatSeqAIJGetArray(), MatSeqAIJGetArrayRead()
Level
Developer
Location
src/mat/impls/aij/seq/aij.c
Implementations
MatSeqAIJGetCSRAndMemType_SeqAIJKokkos in src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
MatSeqAIJGetCSRAndMemType_SeqAIJCUSPARSE in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages