MatDenseGetArrayReadAndMemType#
gives read-only access to the array where the data for a MATDENSE matrix is stored
Synopsis#
#include "petscmat.h" 
PetscErrorCode MatDenseGetArrayReadAndMemType(Mat A, const PetscScalar *array[], PetscMemType *mtype)
Logically Collective
Input Parameter#
- A - a dense matrix 
Output Parameters#
- array - pointer to the data 
- mtype - memory type of the returned pointer 
Note#
If the matrix is of a device type such as MATDENSECUDA, MATDENSEHIP, etc.,
an array on device is always returned and is guaranteed to contain the matrix’s latest data.
See Also#
Matrices, Mat, MATDENSE, MatDenseRestoreArrayReadAndMemType(), MatDenseGetArrayWriteAndMemType(),
MatDenseGetArrayRead(), MatDenseRestoreArrayRead(), MatDenseGetArrayWrite(), MatDenseRestoreArrayWrite(), MatSeqAIJGetCSRAndMemType()
Level#
intermediate
Location#
Examples#
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages