Add getter for sub device index

Related-To: NEO-3691

Change-Id: I1375b3b422997d280e2006b00af8f6fab2314f8b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-11-05 11:25:26 +01:00
committed by sys_ocldev
parent 1bfe9f548e
commit d617219665
3 changed files with 10 additions and 0 deletions

View File

@@ -38,6 +38,10 @@ uint32_t SubDevice::getNumAvailableDevices() const {
uint32_t SubDevice::getRootDeviceIndex() const {
return this->rootDevice.getRootDeviceIndex();
}
uint32_t SubDevice::getSubDeviceIndex() const {
return subDeviceIndex;
}
Device *SubDevice::getDeviceById(uint32_t deviceId) const {
UNRECOVERABLE_IF(deviceId >= getNumAvailableDevices());
return const_cast<SubDevice *>(this);