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#

src/mat/impls/dense/seq/dense.c

Examples#

src/mat/tutorials/ex19.c


Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages