| 144 | } |
| 145 | |
| 146 | int CudaPlatform::VisibleDeviceCount() const { |
| 147 | // Throw away the result - it logs internally, and this [containing] function |
| 148 | // isn't in the path of user control. It's safe to call this > 1x. |
| 149 | if (!gpu::GpuDriver::Init().ok()) { |
| 150 | return -1; |
| 151 | } |
| 152 | |
| 153 | return GpuDriver::GetDeviceCount(); |
| 154 | } |
| 155 | |
| 156 | const string& CudaPlatform::Name() const { return name_; } |
| 157 |