mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 15:53:13 +08:00
Move types defined by using to separated header file Related-To: NEO-3691 Change-Id: I71dfca0644b7022c4a381fbe396d0e32ca7d1ce5 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
37 lines
958 B
C++
37 lines
958 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, uint32_t subDeviceIndex, RootDevice &rootDevice) : Device(executionEnvironment, deviceIndex), subDeviceIndex(subDeviceIndex), 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();
|
|
}
|
|
|
|
DeviceBitfield SubDevice::getDeviceBitfieldForOsContext() const {
|
|
DeviceBitfield deviceBitfield;
|
|
deviceBitfield.set(subDeviceIndex);
|
|
return deviceBitfield;
|
|
}
|
|
|
|
} // namespace NEO
|