MatDenseHIPGetArray#

Provides access to the HIP buffer inside a dense matrix. The array must be restored with MatDenseHIPRestoreArray() when no longer needed.

Synopsis#

#include "petscmat.h"  
PetscErrorCode MatDenseHIPGetArray(Mat A, PetscScalar **a)

Not Collective

Input Parameters#

  • A - the matrix

Output Parameters

  • array - the GPU array in column major order

Notes#

Data can be copied to the GPU due to operations done on the CPU. If you need write only access, use MatDenseHIPGetArrayWrite(). For read-only access, use MatDenseHIPGetArrayRead().

See Also#

MatDenseHIPGetArrayRead(), MatDenseHIPRestoreArray(), MatDenseHIPRestoreArrayWrite(), MatDenseHIPGetArrayWrite(), MatDenseHIPRestoreArrayRead()

Level#

developer

Location#

src/mat/impls/dense/mpi/mpidense.c

Implementations#

MatDenseHIPGetArray_MPIDenseHIP in src/mat/impls/dense/mpi/mpidense.c
MatDenseHIPGetArray_SeqDenseHIP in src/mat/impls/dense/seq/hip/densehip.hip.c


Edit on GitLab

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