| 268 | } |
| 269 | |
| 270 | bool isHalfSupported(int device) { |
| 271 | static std::array<bool, DeviceManager::MAX_DEVICES> half_supported = []() { |
| 272 | std::array<bool, DeviceManager::MAX_DEVICES> out{}; |
| 273 | int count = getDeviceCount(); |
| 274 | for (int i = 0; i < count; i++) { |
| 275 | const auto &prop = getDeviceProp(i); |
| 276 | int compute = prop.major * 1000 + prop.minor * 10; |
| 277 | out[i] = compute >= 5030; |
| 278 | } |
| 279 | return out; |
| 280 | }(); |
| 281 | return half_supported[device]; |
| 282 | } |
| 283 | |
| 284 | void devprop(char *d_name, char *d_platform, char *d_toolkit, char *d_compute) { |
| 285 | if (getDeviceCount() <= 0) { return; } |
no test coverage detected