Skip to main content
`Ctrl`+`K`

# VecHIPRestoreArray

Restore a device buffer previously acquired with `VecHIPGetArray()`.

## Synopsis

    #include <petscvec.h>
    PetscErrorCode VecHIPRestoreArray(Vec v, PetscScalar **a)

Logically 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

Vectors and Parallel Data, `VecHIPGetArray()`, `VecHIPGetArrayRead()`, `VecHIPGetArrayWrite()`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayRead()`

## Level

intermediate

## Location

src/vec/vec/impls/seq/cupm/hip/vecseqcupm.hip.cpp

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages