mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Related-To: NEO-3691 Change-Id: Ia3554424221e102094c40cdd5941680c6a253b18 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
31 lines
730 B
C++
31 lines
730 B
C++
/*
|
|
* Copyright (C) 2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "runtime/device/sub_device.h"
|
|
|
|
#include "runtime/device/root_device.h"
|
|
|
|
namespace NEO {
|
|
|
|
SubDevice::SubDevice(ExecutionEnvironment *executionEnvironment, uint32_t deviceIndex, RootDevice &rootDevice) : Device(executionEnvironment, deviceIndex), rootDevice(rootDevice) {}
|
|
void SubDevice::retain() {
|
|
rootDevice.incRefInternal();
|
|
Device::retain();
|
|
};
|
|
unique_ptr_if_unused<Device> SubDevice::release() {
|
|
rootDevice.decRefInternal();
|
|
return Device::release();
|
|
};
|
|
void SubDevice::retainInternal() {
|
|
rootDevice.incRefInternal();
|
|
}
|
|
void SubDevice::releaseInternal() {
|
|
rootDevice.decRefInternal();
|
|
}
|
|
|
|
} // namespace NEO
|