# PetscDeviceSetDefaultDeviceType
Set the default device type for `PetscDevice` 
## Synopsis
```
#include <petscdevice.h> 
PetscErrorCode PetscDeviceSetDefaultDeviceType(PetscDeviceType type)
```
Not Collective


## Input Parameter

- ***type -*** the new default device type



## Notes
This sets the `PetscDeviceType` returned by `PETSC_DEVICE_DEFAULT()`.




## See Also
 `PetscDeviceType`, `PetscDeviceGetType`,

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/device/interface/device.cxx.html#PetscDeviceSetDefaultDeviceType">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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
