| 30 | std::vector<std::shared_ptr<Device>> Platform::UsedDevice; |
| 31 | std::mutex Platform::mtx_; |
| 32 | int Platform::GetNumGPUs() { |
| 33 | int count; |
| 34 | CUDA_CHECK(cudaGetDeviceCount(&count)); |
| 35 | return count; |
| 36 | } |
| 37 | |
| 38 | bool Platform::CheckDevice(const int device_id) { |
| 39 | bool r = ((cudaSuccess == cudaSetDevice(device_id)) && |