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


## Input Parameters

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





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

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/dense/mpi/mpidense.c.html#MatDenseCUDARestoreArrayWrite_MPIDenseCUDA">MatDenseCUDARestoreArrayWrite_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#MatDenseCUDARestoreArrayWrite_SeqDenseCUDA">MatDenseCUDARestoreArrayWrite_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)  
