| 279 | } |
| 280 | |
| 281 | bool isDeviceBufferAccessible(int buf_device_id, int execution_id) { |
| 282 | DeviceManager& devMngr = DeviceManager::getInstance(); |
| 283 | |
| 284 | common::lock_guard_t lock(devMngr.deviceMutex); |
| 285 | |
| 286 | return buf_device_id == execution_id || |
| 287 | *devMngr.mContexts[buf_device_id] == |
| 288 | *devMngr.mContexts[execution_id]; |
| 289 | } |
| 290 | |
| 291 | const Context& getContext() { |
| 292 | device_id_t& devId = tlocalActiveDeviceId(); |