34#if defined(SIRIUS_CUDA) || defined(SIRIUS_ROCM)
35 static std::atomic<int> count(-1);
36 if (count.load(std::memory_order_relaxed) == -1) {
38 if (GPU_PREFIX(GetDeviceCount)(&c) != GPU_PREFIX(Success)) {
39 count.store(0, std::memory_order_relaxed);
41 count.store(c, std::memory_order_relaxed);
44 return count.load(std::memory_order_relaxed);
52 static std::vector<acc_stream_t> streams_;
Interface to accelerators API.
int num_devices()
Get the number of devices.
std::vector< acc_stream_t > & streams()
Vector of device streams.
Namespace of the SIRIUS library.