17 #if defined(MFEM_USE_CUDA) && OCCA_CUDA_ENABLED 18 #include <occa/modes/cuda/utils.hpp> 25 namespace internal {
extern occa::device occaDevice; }
27 occa::device &
OccaDev() {
return internal::occaDevice; }
31 #if defined(MFEM_USE_CUDA) && OCCA_CUDA_ENABLED 35 return occa::cuda::wrapMemory(internal::occaDevice, ptr, bytes);
37 #endif // MFEM_USE_CUDA && OCCA_CUDA_ENABLED 39 return occa::cpu::wrapMemory(internal::occaDevice, ptr, bytes);
44 #endif // MFEM_USE_OCCA [device] OCCA CUDA backend. Enabled when MFEM_USE_OCCA = YES and MFEM_USE_CUDA = YES.
occa::memory OccaMemoryWrap(void *ptr, std::size_t bytes)
Wrap a pointer as occa::memory with the default occa::device used by MFEM.
occa::device & OccaDev()
Return the default occa::device used by MFEM.
static bool Allows(unsigned long b_mask)
Return true if any of the backends in the backend mask, b_mask, are allowed.