| 397 | } |
| 398 | |
| 399 | int setDevice(int device) { |
| 400 | DeviceManager& devMngr = DeviceManager::getInstance(); |
| 401 | |
| 402 | common::lock_guard_t lock(devMngr.deviceMutex); |
| 403 | |
| 404 | if (device >= static_cast<int>(devMngr.mQueues.size()) || |
| 405 | device >= static_cast<int>(DeviceManager::MAX_DEVICES)) { |
| 406 | return -1; |
| 407 | } else { |
| 408 | int old = getActiveDeviceId(); |
| 409 | setActiveContext(device); |
| 410 | return old; |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | void sync(int device) { |
| 415 | int currDevice = getActiveDeviceId(); |
no test coverage detected