:orphan:
# PETSC_DEVICE_DEFAULT
Retrieve the current default `PetscDeviceType` 
## Synopsis
```
#include <petscdevice.h> 
PetscDeviceType PETSC_DEVICE_DEFAULT(void)
```
Not Collective




## Notes
Unless selected by the user, the default device is selected in the following order:
`PETSC_DEVICE_HIP`, `PETSC_DEVICE_CUDA`, `PETSC_DEVICE_SYCL`, `PETSC_DEVICE_HOST`.


## See Also
 `PetscDeviceType`, `PetscDeviceSetDefaultDeviceType()`, `PetscDeviceGetType()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/device/interface/device.cxx.html#PETSC_DEVICE_DEFAULT">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)  
