MatCreateDenseWithMemType#
Create a matrix that matches the supplied PetscMemType.
Synopsis#
#include "petscmat.h"
PetscErrorCode MatCreateDenseWithMemType(MPI_Comm comm, PetscMemType mtype, PetscInt m, PetscInt n, PetscInt M, PetscInt N, PetscInt lda, PetscScalar *data, Mat *A)
Collective
Input Parameters#
comm - the communicator
mtype - the memory type
m - number of local rows (or
PETSC_DECIDEto have calculated ifMis given)n - number of local columns (or
PETSC_DECIDEto have calculated ifNis given)M - number of global rows (or
PETSC_DECIDEto have calculated ifmis given)N - number of global columns (or
PETSC_DECIDEto have calculated ifnis given)lda - leading dimension (or
PETSC_DECIDEto use the default)data - optional location of matrix data, which should match the specified
mtype. PassNULLto have PETSc take care of matrix memory allocation.
Output Parameter#
A - the dense matrix
See Also#
Matrices, Mat, MatCreateDense(), MatCreateDenseCUDA(), MatCreateDenseHIP(), MatCreateDenseFromVecType(), PetscMemType
Level#
advanced
Location#
src/mat/utils/veccreatematdense.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages