| 235 | } |
| 236 | |
| 237 | int getDeviceIdFromNativeId(cl_device_id id) { |
| 238 | DeviceManager& devMngr = DeviceManager::getInstance(); |
| 239 | |
| 240 | common::lock_guard_t lock(devMngr.deviceMutex); |
| 241 | |
| 242 | int nDevices = static_cast<int>(devMngr.mDevices.size()); |
| 243 | int devId = 0; |
| 244 | for (devId = 0; devId < nDevices; ++devId) { |
| 245 | if (id == devMngr.mDevices[devId]->operator()()) { break; } |
| 246 | } |
| 247 | |
| 248 | return devId; |
| 249 | } |
| 250 | |
| 251 | int getActiveDeviceType() { |
| 252 | device_id_t& devId = tlocalActiveDeviceId(); |
no test coverage detected