mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Use DeviceHelper to calculate number of sub devices
Related-To: NEO-3691 Change-Id: I390b7919fe8960b74cf290923f5daf128d824674 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
bool MockDevice::createSingleDevice = true;
|
||||
|
||||
MockDevice::MockDevice()
|
||||
: MockDevice(new MockExecutionEnvironment(), 0u) {
|
||||
CommandStreamReceiver *commandStreamReceiver = createCommandStream(*this->executionEnvironment);
|
||||
@@ -40,6 +42,13 @@ MockDevice::MockDevice(ExecutionEnvironment *executionEnvironment, uint32_t devi
|
||||
initializeCaps();
|
||||
}
|
||||
|
||||
bool MockDevice::createDeviceImpl() {
|
||||
if (MockDevice::createSingleDevice) {
|
||||
return Device::createDeviceImpl();
|
||||
}
|
||||
return RootDevice::createDeviceImpl();
|
||||
}
|
||||
|
||||
void MockDevice::setOSTime(OSTime *osTime) {
|
||||
this->osTime.reset(osTime);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user