Add method to device that returns device id.

Change-Id: I0fc5d1e37eb6f49a513c202a89db07ef539646f3
This commit is contained in:
Mrozek, Michal
2018-09-07 08:45:13 +02:00
committed by sys_ocldev
parent ac2a2de3be
commit 05b93ef221
3 changed files with 16 additions and 0 deletions

View File

@@ -267,4 +267,9 @@ GFXCORE_FAMILY Device::getRenderCoreFamily() const {
bool Device::isSourceLevelDebuggerActive() const {
return deviceInfo.sourceLevelDebuggerActive;
}
uint32_t Device::getDeviceIndex() {
return osContext->getContextId();
}
} // namespace OCLRT

View File

@@ -133,6 +133,7 @@ class Device : public BaseObject<_cl_device_id> {
ExecutionEnvironment *getExecutionEnvironment() const { return executionEnvironment; }
const HardwareCapabilities &getHardwareCapabilities() { return hardwareCapabilities; }
OsContext *getOsContext() const { return osContext; }
uint32_t getDeviceIndex();
protected:
Device() = delete;