:orphan: # VecHIPRestoreArray Restore a device buffer previously acquired with `VecHIPGetArray()`. ## Synopsis ``` #include PetscErrorCode VecHIPRestoreArray(Vec v, PetscScalar **a) ``` Not Collective; 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), `VecHIPGetArray()`, `VecHIPGetArrayRead()`, `VecHIPGetArrayWrite()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayRead()` ## Level intermediate ## Location src/vec/vec/impls/seq/cupm/hip/vecseqcupm.hip.cpp --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/impls/seq/cupm/hip/vecseqcupm.hip.cpp) [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)