# VecViennaCLGetCLMemRead
Provides access to the the CL buffer inside a Vec. 
## Synopsis
```
#include "petscvec.h" 
PETSC_EXTERN PetscErrorCode VecViennaCLGetCLMemRead(Vec v, PETSC_UINTPTR_T *mem)
```
Caller should cast (*mem) to (const cl_mem). Caller is responsible for
invoking clReleaseMemObject().


## Input Parameters

- ***v    -*** the vector



## Output Parameters

- ***mem -*** pointer to the device buffer





## See Also
 `VecViennaCLGetCLContext()`, `VecViennaCLGetCLMemWrite()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/seq/seqviennacl/vecviennacl.cxx.html#VecViennaCLGetCLMemRead">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)  
