:orphan: # VecCUDARestoreArray Restore a device buffer previously acquired with `VecCUDAGetArray()`. ## Synopsis ``` #include PetscErrorCode VecCUDARestoreArray(Vec v, PetscScalar **a) ``` NotCollective; Asynchronous; No Fortran Support ## Input Parameters - ***v -*** the vector - ***a -*** the device buffer ## Note The restored pointer is invalid after this function returns. This function also marks the host data as out of date. Subsequent access to the vector data on the host side via `VecGetArray()` will incur a (synchronous) data transfer. ## See Also [](ch_vectors), `VecCUDAGetArray()`, `VecCUDAGetArrayRead()`, `VecCUDAGetArrayWrite()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayRead()` ## Level intermediate ## Location src/vec/vec/impls/seq/cupm/cuda/vecseqcupm.cu --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/impls/seq/cupm/cuda/vecseqcupm.cu) [Index of all Vec routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)