mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 12:33:12 +08:00
Include files are now grouped and sorted in following order: 1. Header file of the class the current file implements 2. Project files 3. Third party files 4. Standard library Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
32 lines
1.2 KiB
C++
32 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "unit_tests/fixtures/memory_manager_fixture.h"
|
|
|
|
#include "runtime/command_stream/preemption.h"
|
|
#include "runtime/helpers/hw_helper.h"
|
|
#include "runtime/os_interface/os_context.h"
|
|
#include "unit_tests/mocks/mock_csr.h"
|
|
#include "unit_tests/mocks/mock_memory_manager.h"
|
|
|
|
using namespace OCLRT;
|
|
|
|
void MemoryManagerWithCsrFixture::SetUp() {
|
|
csr = new MockCommandStreamReceiver(this->executionEnvironment);
|
|
memoryManager = new MockMemoryManager(executionEnvironment);
|
|
executionEnvironment.memoryManager.reset(memoryManager);
|
|
csr->tagAddress = ¤tGpuTag;
|
|
executionEnvironment.commandStreamReceivers.resize(1);
|
|
executionEnvironment.commandStreamReceivers[0].push_back(std::unique_ptr<CommandStreamReceiver>(csr));
|
|
auto engine = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0];
|
|
auto osContext = memoryManager->createAndRegisterOsContext(csr, engine, 1, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0]));
|
|
csr->setupContext(*osContext);
|
|
}
|
|
|
|
void MemoryManagerWithCsrFixture::TearDown() {
|
|
}
|