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;
Values#
PETSC_DEVICE_HOST- Host, no accelerator backend foundPETSC_DEVICE_CUDA- CUDA enabled GPUPETSC_DEVICE_HIP- ROCM/HIP enabled GPUPETSC_DEVICE_SYCL- SYCL enabled devicePETSC_DEVICE_MAX- Always 1 greater than the largest validPetscDeviceType, invalid type, do not use
Note#
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#
Examples#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages