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

Function getDeviceNativeId

src/backend/cuda/platform.cpp:379–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377int getActiveDeviceId() { return tlocalActiveDeviceId(); }
378
379int getDeviceNativeId(int device) {
380 if (device <
381 static_cast<int>(DeviceManager::getInstance().cuDevices.size())) {
382 return DeviceManager::getInstance().cuDevices[device].nativeId;
383 }
384 return -1;
385}
386
387int getDeviceIdFromNativeId(int nativeId) {
388 DeviceManager &mngr = DeviceManager::getInstance();

Callers 4

initFunction · 0.85
afcu_get_native_idFunction · 0.85
checkAndMigrateFunction · 0.85
setActiveDeviceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected