# MatDenseCUDARestoreArray
Restore access to the CUDA buffer inside a `MATDENSECUDA` matrix previously obtained with `MatDenseCUDAGetArray()`. 
## Synopsis
```
#include "petscmat.h"  
PetscErrorCode MatDenseCUDARestoreArray(Mat A, PetscScalar **a)
```
Not Collective


## Input Parameters

- ***A -*** the matrix
- ***array -*** the GPU array in column major order





## See Also
 `MATDENSECUDA`, `MatDenseCUDAGetArray()`, `MatDenseCUDARestoreArrayWrite()`, `MatDenseCUDAGetArrayWrite()`, `MatDenseCUDARestoreArrayRead()`, `MatDenseCUDAGetArrayRead()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/mpi/mpidense.c.html#MatDenseCUDARestoreArray">src/mat/impls/dense/mpi/mpidense.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/mpi/mpidense.c.html#MatDenseCUDARestoreArray_MPIDenseCUDA">MatDenseCUDARestoreArray_MPIDenseCUDA in src/mat/impls/dense/mpi/mpidense.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/seq/cuda/densecuda.cu.html#MatDenseCUDARestoreArray_SeqDenseCUDA">MatDenseCUDARestoreArray_SeqDenseCUDA in src/mat/impls/dense/seq/cuda/densecuda.cu</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/dense/mpi/mpidense.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
