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