# VecViennaCLGetCLContext
Get the OpenCL context in which the Vec resides. 
## Synopsis
```
#include "petscvec.h" 
PETSC_EXTERN PetscErrorCode VecViennaCLGetCLContext(Vec v, PETSC_UINTPTR_T *ctx)
```
Caller should cast (*ctx) to (const cl_context). Caller is responsible for
invoking clReleaseContext().


## Input Parameters

- ***v    -*** the vector



## Output Parameters

- ***ctx -*** pointer to the underlying CL context





## See Also
 `VecViennaCLGetCLQueue()`, `VecViennaCLGetCLMemRead()`

## Level
intermediate

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