# VecRestoreKokkosViewWrite
Returns a Kokkos View gotten with `VecGetKokkosViewWrite()`. 
## Synopsis
```
template <class MemorySpace>
PetscErrorCode VecRestoreKokkosViewWrite(Vec, Kokkos::View<PetscScalar *, MemorySpace> *)
```

## Synopsis
```
#include <petscvec_kokkos.hpp>
PetscErrorCode VecRestoreKokkosViewWrite  (Vec v,Kokkos::View<PetscScalar*,MemorySpace>* kv);
```

Logically Collective


## Input Parameters

- ***v  -*** the vector in type of `VECKOKKOS`
- ***kv -*** the Kokkos View with a user-specified template parameter MemorySpace



## Notes
If the vector is not of type `VECKOKKOS`, an error will be raised.

The function is similar to `VecRestoreArrayWrite()`. It is the counterpart of `VecGetKokkosViewWrite()`.




## See Also
 `VecGetKokkosViewWrite()`, `VecGetKokkosView()`, `VecGetKokkosView()`, `VecRestoreArray()`, `VecGetArrayRead()`, `VecGetArrays()`, `VecGetArrayF90()`, `VecGetArrayReadF90()`, `VecPlaceArray()`, `VecGetArray2d()`,
`VecGetArrayPair()`, `VecRestoreArrayPair()`, `VecGetArrayWrite()`, `VecRestoreArrayWrite()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscvec_kokkos.hpp#VecRestoreKokkosViewWrite">include/petscvec_kokkos.hpp</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscvec_kokkos.hpp)


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