17 namespace accelerator {
21 std::unique_ptr<mfem::Device> device;
26 SLIC_ERROR_ROOT_IF(device,
"smith::accelerator::initializeDevice cannot be called more than once");
27 device = std::make_unique<mfem::Device>();
29 case ExecutionSpace::GPU:
30 #if defined(MFEM_USE_CUDA) && defined(SMITH_USE_CUDA_KERNEL_EVALUATION)
31 device->Configure(
"cuda");
32 #elif defined(MFEM_USE_HIP)
33 device->Configure(
"hip");
36 case ExecutionSpace::CPU:
38 case ExecutionSpace::Dynamic:
This file contains the interface used for initializing/terminating any hardware accelerator-related f...
This file contains the all the necessary functions and macros required for logging as well as a helpe...
void initializeDevice(ExecutionSpace exec_space)
Initializes the device (GPU)
void terminateDevice()
Cleans up the device, if applicable.
Accelerator functionality.
ExecutionSpace
enum used for signalling whether or not to perform certain calculations on the CPU or GPU