:orphan:
# PetscDeviceContextGetDeviceType
Get the `PetscDeviceType` for a `PetscDeviceContext` 
## Synopsis
```
#include <petscdevice.h> 
PetscErrorCode PetscDeviceContextGetDeviceType(PetscDeviceContext dctx, PetscDeviceType *type)
```
Not Collective


## Input Parameter

- ***dctx -*** The `PetscDeviceContext`



## Output Parameter

- ***type -*** The `PetscDeviceType`





## Note
This routine is a convenience shorthand for `PetscDeviceContextGetDevice()` ->
`PetscDeviceGetType()`.


## See Also
 `PetscDeviceType`, `PetscDeviceContextGetDevice()`, `PetscDeviceGetType()`, `PetscDevice`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/device/interface/dcontext.cxx.html#PetscDeviceContextGetDeviceType">src/sys/objects/device/interface/dcontext.cxx</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/device/interface/dcontext.cxx)


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