17#if defined(MFEM_USE_CUDA) && OCCA_CUDA_ENABLED
18#include <occa/modes/cuda/utils.hpp>
25namespace internal {
extern occa::device occaDevice; }
27occa::device &
OccaDev() {
return internal::occaDevice; }
31#if defined(MFEM_USE_CUDA) && OCCA_CUDA_ENABLED
35 return occa::cuda::wrapMemory(internal::occaDevice, ptr, bytes);
39 return occa::cpu::wrapMemory(internal::occaDevice, ptr, bytes);
static bool Allows(unsigned long b_mask)
Return true if any of the backends in the backend mask, b_mask, are allowed.
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.
@ OCCA_CUDA
[device] OCCA CUDA backend. Enabled when MFEM_USE_OCCA = YES and MFEM_USE_CUDA = YES.