PetscOffloadMask#
indicates which memory (CPU, GPU, or none) contains valid data
Synopsis#
#include <petscdevicetypes.h>
typedef enum {
PETSC_OFFLOAD_UNALLOCATED = 0, /* 0x0 */
PETSC_OFFLOAD_CPU = 1, /* 0x1 */
PETSC_OFFLOAD_GPU = 2, /* 0x2 */
PETSC_OFFLOAD_BOTH = 3, /* 0x3 */
PETSC_OFFLOAD_VECKOKKOS_DEPRECATED = 256, /* 0x100 */
PETSC_OFFLOAD_KOKKOS = 256 /* 0x100 */
} PetscOffloadMask;
Values#
PETSC_OFFLOAD_UNALLOCATED
- no memory contains valid matrix entries; NEVER used for vectorsPETSC_OFFLOAD_GPU
- GPU has valid vector/matrix entriesPETSC_OFFLOAD_CPU
- CPU has valid vector/matrix entriesPETSC_OFFLOAD_BOTH
- Both GPU and CPU have valid vector/matrix entries and they matchPETSC_OFFLOAD_KOKKOS
- Reserved for Kokkos matrix and vector. It means the offload is managed by Kokkos, thus this flag itself cannot tell you where the valid data is.
Developer Note#
This enum uses a function (PetscOffloadMaskToString()
) to convert to string representation so
cannot be used in PetscOptionsEnum()
.
See Also#
PetscOffloadMaskToString()
, PetscOffloadMaskToMemType()
, PetscOffloadMaskToDeviceCopyMode()
Level#
developer
Location#
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages