Update sub device internal ref counts

Change-Id: I82eea99bbb3d1edc32d09c0b703dee30b62f6b76
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-04-02 16:38:42 +02:00
committed by sys_ocldev
parent 6d4832fe24
commit f2c11eb870
8 changed files with 107 additions and 11 deletions

View File

@@ -15,6 +15,13 @@ SubDevice::SubDevice(ExecutionEnvironment *executionEnvironment, uint32_t subDev
: Device(executionEnvironment), subDeviceIndex(subDeviceIndex), rootDevice(rootDevice) {
}
void SubDevice::incRefInternal() {
rootDevice.incRefInternal();
}
unique_ptr_if_unused<Device> SubDevice::decRefInternal() {
return rootDevice.decRefInternal();
}
DeviceBitfield SubDevice::getDeviceBitfield() const {
DeviceBitfield deviceBitfield;
deviceBitfield.set(subDeviceIndex);