mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Make OsInterface root device specific
Related-To: NEO-3857 Change-Id: Ibcd80c731b5d3755b62e0e03d0ffeedb08b52ca0 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
066eab2be7
commit
172e75147e
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -149,7 +149,7 @@ TEST(ExecutionEnvironment, givenExecutionEnvironmentWhenInitializeMemoryManagerI
|
||||
static_assert(sizeof(ExecutionEnvironment) == sizeof(std::mutex) +
|
||||
sizeof(std::unique_ptr<HardwareInfo>) +
|
||||
sizeof(std::vector<RootDeviceEnvironment>) +
|
||||
(is64bit ? 72 : 40),
|
||||
(is64bit ? 64 : 36),
|
||||
"New members detected in ExecutionEnvironment, please ensure that destruction sequence of objects is correct");
|
||||
|
||||
TEST(ExecutionEnvironment, givenExecutionEnvironmentWithVariousMembersWhenItIsDestroyedThenDeleteSequenceIsSpecified) {
|
||||
@@ -161,12 +161,12 @@ TEST(ExecutionEnvironment, givenExecutionEnvironmentWithVariousMembersWhenItIsDe
|
||||
struct GmmHelperMock : public DestructorCounted<GmmHelper, 7> {
|
||||
GmmHelperMock(uint32_t &destructorId, const HardwareInfo *hwInfo) : DestructorCounted(destructorId, nullptr, hwInfo) {}
|
||||
};
|
||||
struct OsInterfaceMock : public DestructorCounted<OSInterface, 6> {
|
||||
OsInterfaceMock(uint32_t &destructorId) : DestructorCounted(destructorId) {}
|
||||
};
|
||||
struct MemoryMangerMock : public DestructorCounted<MockMemoryManager, 5> {
|
||||
struct MemoryMangerMock : public DestructorCounted<MockMemoryManager, 6> {
|
||||
MemoryMangerMock(uint32_t &destructorId, ExecutionEnvironment &executionEnvironment) : DestructorCounted(destructorId, executionEnvironment) {}
|
||||
};
|
||||
struct OsInterfaceMock : public DestructorCounted<OSInterface, 5> {
|
||||
OsInterfaceMock(uint32_t &destructorId) : DestructorCounted(destructorId) {}
|
||||
};
|
||||
struct MemoryOperationsHandlerMock : public DestructorCounted<MockMemoryOperationsHandler, 4> {
|
||||
MemoryOperationsHandlerMock(uint32_t &destructorId) : DestructorCounted(destructorId) {}
|
||||
};
|
||||
@@ -187,7 +187,7 @@ TEST(ExecutionEnvironment, givenExecutionEnvironmentWithVariousMembersWhenItIsDe
|
||||
executionEnvironment->setHwInfo(*platformDevices);
|
||||
executionEnvironment->prepareRootDeviceEnvironments(1);
|
||||
executionEnvironment->gmmHelper = std::make_unique<GmmHelperMock>(destructorId, platformDevices[0]);
|
||||
executionEnvironment->osInterface = std::make_unique<OsInterfaceMock>(destructorId);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->osInterface = std::make_unique<OsInterfaceMock>(destructorId);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique<MemoryOperationsHandlerMock>(destructorId);
|
||||
executionEnvironment->memoryManager = std::make_unique<MemoryMangerMock>(destructorId, *executionEnvironment);
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::make_unique<AubCenterMock>(destructorId);
|
||||
|
||||
Reference in New Issue
Block a user