| 506 | } |
| 507 | |
| 508 | int setDevice(int device) { |
| 509 | DeviceManager& devMngr = DeviceManager::getInstance(); |
| 510 | |
| 511 | common::lock_guard_t lock(devMngr.deviceMutex); |
| 512 | |
| 513 | if (device >= static_cast<int>(devMngr.mQueues.size()) || |
| 514 | device >= static_cast<int>(DeviceManager::MAX_DEVICES)) { |
| 515 | return -1; |
| 516 | } else { |
| 517 | int old = getActiveDeviceId(); |
| 518 | setActiveContext(device); |
| 519 | return old; |
| 520 | } |
| 521 | } |
| 522 | |
| 523 | void sync(int device) { |
| 524 | int currDevice = getActiveDeviceId(); |
no test coverage detected