Files
compute-runtime/shared/source/execution_environment/root_device_environment.cpp
Mateusz Jablonski ec647dabe9 Move GmmHelper to RootDeviceEnvironment
Related-To: NEO-3691
Change-Id: I8afdf65f360acc5b9d7b47a728d1d185e5e3700b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2020-02-27 15:50:56 +01:00

46 lines
1.4 KiB
C++

/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/gmm_helper/gmm_helper.h"
#include "shared/source/gmm_helper/page_table_mngr.h"
#include "shared/source/memory_manager/memory_operations_handler.h"
#include "shared/source/os_interface/os_interface.h"
#include "opencl/source/aub/aub_center.h"
namespace NEO {
RootDeviceEnvironment::RootDeviceEnvironment(ExecutionEnvironment &executionEnvironment) : executionEnvironment(executionEnvironment) {}
RootDeviceEnvironment::~RootDeviceEnvironment() = default;
void RootDeviceEnvironment::initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) {
if (!aubCenter) {
aubCenter.reset(new AubCenter(getHardwareInfo(), localMemoryEnabled, aubFileName, csrType));
}
}
const HardwareInfo *RootDeviceEnvironment::getHardwareInfo() const {
return executionEnvironment.getHardwareInfo();
}
GmmHelper *RootDeviceEnvironment::getGmmHelper() const {
return gmmHelper.get();
}
GmmClientContext *RootDeviceEnvironment::getGmmClientContext() const {
return gmmHelper->getClientContext();
}
void RootDeviceEnvironment::initGmm() {
if (!gmmHelper) {
gmmHelper.reset(new GmmHelper(osInterface.get(), getHardwareInfo()));
}
}
} // namespace NEO