1: #pragma once 3: #include <petscmacros.h> 4: #include <petscdevice_cuda.h> 5: #include <petscdevice_hip.h> 7: /* MANSEC = Sys */ 9: #if PetscDefined(USING_HCC) && PetscDefined(USING_NVCC) 10: #error using both nvcc and hipcc at the same time? 11: #endif 13: /* 14: The CUDA-like Programming Model (CUPM) is PETSc's shared abstraction over the 15: CUDA and HIP runtimes, whose APIs are structurally near-identical. A single 16: templated implementation (see the cupm/ directories under src/) is compiled 17: for either backend. See doc/developers/style.md for a concise discussion of CUPM. 18: */ 20: #if PetscDefined(USING_NVCC) || PetscDefined(USING_HCC) 21: #define PETSC_USING_CUPMCC 1 22: #endif