14 #ifndef QMCPLUSPLUS_DEVICEMANAGER_H 15 #define QMCPLUSPLUS_DEVICEMANAGER_H 19 #if defined(ENABLE_CUDA) 22 #if defined(ENABLE_OFFLOAD) 25 #if defined(ENABLE_SYCL) 65 #if defined(ENABLE_CUDA) 66 const auto& getCUDADM()
const {
return cuda_dm_; }
68 #if defined(ENABLE_OFFLOAD) 69 const auto& getOMPDM()
const {
return omptarget_dm_; }
71 #if defined(ENABLE_SYCL) 72 const auto& getSYCLDM()
const {
return sycl_dm_; }
84 static std::unique_ptr<DeviceManager>
global;
89 #if defined(ENABLE_CUDA) 93 #if defined(ENABLE_OFFLOAD) 97 #if defined(ENABLE_SYCL) helper functions for EinsplineSetBuilder
DeviceManager(int local_rank, int local_size)
constructor
static std::unique_ptr< DeviceManager > global
the global singleton which can be used to query default devices and all the captured devices...
static const DeviceManager & getGlobal()
global instance accessor
orchestrate platforms (programming models) and set up the default device on each platform ...
int getDefaultDeviceNum() const
int default_device_num
the id of default device. Must be defined before platform device manager objects
static void initializeGlobalDeviceManager(int local_rank, int local_size)
initialize the global instance of DeviceManager arguments are the same as the constructor ...
int getNumDevices() const
int num_devices
the number of devices. Must be defined before platform device manager objects