# PetscDeviceType
Kind of accelerator device backend 
## Synopsis
```
#include <petscdevicetypes.h> 
typedef enum {
  PETSC_DEVICE_HOST,
  PETSC_DEVICE_CUDA,
  PETSC_DEVICE_HIP,
  PETSC_DEVICE_SYCL,
  PETSC_DEVICE_MAX
} PetscDeviceType;
```
```none
PETSC_DEVICE_HOST - Host, no accelerator backend found
```
```none
PETSC_DEVICE_CUDA - CUDA enabled GPU
```
```none
PETSC_DEVICE_HIP  - ROCM/HIP enabled GPU
```
```none
PETSC_DEVICE_SYCL - SYCL enabled device
```
```none
PETSC_DEVICE_MAX  - Always 1 greater than the largest valid PetscDeviceType, invalid type, do not use
```


## Notes
One can also use the `PETSC_DEVICE_DEFAULT()` routine to get the current default `PetscDeviceType`.




## See Also
 `PetscDevice`, `PetscDeviceInitType`, `PetscDeviceCreate()`, `PETSC_DEVICE_DEFAULT()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscdevicetypes.h.html#PetscDeviceType">include/petscdevicetypes.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdevicetypes.h)


[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)  
