| 36 | } |
| 37 | |
| 38 | bool Platform::CheckDevice(const int device_id) { |
| 39 | bool r = ((cudaSuccess == cudaSetDevice(device_id)) && |
| 40 | (cudaSuccess == cudaFree(0))); |
| 41 | // reset any error that may have occurred. |
| 42 | cudaGetLastError(); |
| 43 | return r; |
| 44 | } |
| 45 | |
| 46 | /// Return the total num of free GPUs |
| 47 | const vector<int> Platform::GetGPUIDs() { |
nothing calls this directly
no outgoing calls
no test coverage detected