MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / isHalfSupported

Function isHalfSupported

src/backend/cuda/platform.cpp:270–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270bool 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
284void devprop(char *d_name, char *d_platform, char *d_toolkit, char *d_compute) {
285 if (getDeviceCount() <= 0) { return; }

Callers 1

verifyTypeSupportFunction · 0.70

Calls 1

getDeviceCountFunction · 0.70

Tested by

no test coverage detected