MatDenseHIPReplaceArray#
Allows one to replace the GPU array in a dense matrix with an array provided by the user. This is useful to avoid copying an array into a matrix
Synopsis#
#include "petscmat.h"
PetscErrorCode MatDenseHIPReplaceArray(Mat mat, const PetscScalar *array)
Not Collective
Input Parameters#
mat - the matrix
array - the array in column major order
Notes#
This permanently replaces the GPU array and frees the memory associated with the old GPU array. The memory passed in CANNOT be freed by the user. It will be freed when the matrix is destroyed. The array should respect the matrix leading dimension.
See Also#
MatDenseHIPGetArray(), MatDenseHIPPlaceArray(), MatDenseHIPResetArray()
Level#
developer
Location#
Implementations#
MatDenseHIPReplaceArray_MPIDenseHIP in src/mat/impls/dense/mpi/mpidense.c
MatDenseHIPReplaceArray_SeqDenseHIP in src/mat/impls/dense/seq/hip/densehip.hip.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages