petsc-3.14.6 2021-03-30
Report Typos and Errors

MatDenseCUDAGetArrayRead

Provides read-only access to the CUDA buffer inside a dense matrix. The array must be restored with MatDenseCUDARestoreArrayRead() when no longer needed.

Synopsis

#include "petscmat.h"  
PetscErrorCode MatDenseCUDAGetArrayRead(Mat A, const 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 MatDenseCUDAGetArrayWrite().

See Also

MatDenseCUDAGetArray(), MatDenseCUDARestoreArray(), MatDenseCUDARestoreArrayWrite(), MatDenseCUDAGetArrayWrite(), MatDenseCUDARestoreArrayRead()

Level

developer

Location

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

Implementations

MatDenseCUDAGetArrayRead_MPIDenseCUDA in src/mat/impls/dense/mpi/mpidense.c
MatDenseCUDAGetArrayRead_SeqDenseCUDA in src/mat/impls/dense/seq/cuda/densecuda.cu

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