# VecViennaCLPlaceArray
Replace the viennacl vector in a Vec with the one provided by the user. This is useful to avoid a copy. 
## Synopsis
```
#include "petscvec.h" 
PETSC_EXTERN PetscErrorCode VecViennaCLPlaceArray(Vec vin, const ViennaCLVector *a)
```
Not Collective


## Input Parameters

- ***vec -*** the vector
- ***array -*** the ViennaCL vector



## Notes
You can return to the original viennacl vector with a call to
VecViennaCLResetArray() It is not possible to use VecViennaCLPlaceArray()
and VecPlaceArray() at the same time on the same vector.




## See Also
 `VecPlaceArray()`, `VecSetValues()`, `VecViennaCLResetArray()`,
`VecCUDAPlaceArray()`,


## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx.html#VecViennaCLPlaceArray">src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx)


[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)  
