| 212 | } |
| 213 | |
| 214 | int getDeviceCount() noexcept try { |
| 215 | DeviceManager& devMngr = DeviceManager::getInstance(); |
| 216 | |
| 217 | common::lock_guard_t lock(devMngr.deviceMutex); |
| 218 | return static_cast<int>(devMngr.mQueues.size()); |
| 219 | } catch (const AfError& err) { |
| 220 | UNUSED(err); |
| 221 | // If device manager threw an error then return 0 because no platforms |
| 222 | // were found |
| 223 | return 0; |
| 224 | } |
| 225 | |
| 226 | void init() { |
| 227 | thread_local const DeviceManager& devMngr = DeviceManager::getInstance(); |
no outgoing calls
no test coverage detected