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

Function getDeviceIdFromNativeId

src/backend/cuda/platform.cpp:387–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387int getDeviceIdFromNativeId(int nativeId) {
388 DeviceManager &mngr = DeviceManager::getInstance();
389
390 int devId = 0;
391 for (devId = 0; devId < mngr.nDevices; ++devId) {
392 if (nativeId == mngr.cuDevices[devId].nativeId) { break; }
393 }
394 return devId;
395}
396
397cudaStream_t getStream(int device) {
398 static once_flag streamInitFlags[DeviceManager::MAX_DEVICES];

Callers 1

afcu_set_native_idFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected