:orphan:
# PetscDeviceGetType
Get the type of device 
## Synopsis
```
#include <petscdevice.h> 
PetscErrorCode PetscDeviceGetType(PetscDevice device, PetscDeviceType *type)
```
Not Collective


## Input Parameter

- ***device -*** The `PetscDevice`



## Output Parameter

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





## See Also
 `PetscDevice`, `PetscDeviceType`, `PetscDeviceSetDefaultDeviceType()`,
`PetscDeviceCreate()`, `PetscDeviceConfigure()`, `PetscDeviceDestroy()`,
`PetscDeviceGetDeviceId()`, `PETSC_DEVICE_DEFAULT()`

## Level
beginner

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/device/interface/device.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)  
