Files
compute-runtime/runtime/execution_environment/execution_environment.h
Mateusz Jablonski 5a8f455a84 Remove csrsContainer from root device environment
improve mocking:
- add method to create RootDevice in Platform
- add method to create SubDevice in RootDevice
- add method to create CommandStreamReceiver in Device

Related-To: NEO-3691

Change-Id: Ie9fe3de260492604333c8ca93796bfbffae518c4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-11-13 10:05:09 +01:00

63 lines
1.8 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "core/execution_environment/root_device_environment.h"
#include "core/utilities/reference_tracked_object.h"
#include "runtime/helpers/options.h"
#include "runtime/os_interface/device_factory.h"
#include <mutex>
#include <vector>
namespace NEO {
class BuiltIns;
class CompilerInterface;
class GmmHelper;
class MemoryManager;
class MemoryOperationsHandler;
class OSInterface;
class RootDevice;
class SourceLevelDebugger;
struct HardwareInfo;
class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment> {
private:
std::mutex mtx;
DeviceFactoryCleaner cleaner;
protected:
std::unique_ptr<GmmHelper> gmmHelper;
std::unique_ptr<HardwareInfo> hwInfo;
public:
ExecutionEnvironment();
~ExecutionEnvironment() override;
MOCKABLE_VIRTUAL void initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType);
void initGmm();
void initializeMemoryManager();
void initSourceLevelDebugger();
void setHwInfo(const HardwareInfo *hwInfo);
const HardwareInfo *getHardwareInfo() const { return hwInfo.get(); }
HardwareInfo *getMutableHardwareInfo() const { return hwInfo.get(); }
bool isFullRangeSvm() const;
GmmHelper *getGmmHelper() const;
MOCKABLE_VIRTUAL CompilerInterface *getCompilerInterface();
BuiltIns *getBuiltIns();
std::unique_ptr<OSInterface> osInterface;
std::unique_ptr<MemoryOperationsHandler> memoryOperationsInterface;
std::unique_ptr<MemoryManager> memoryManager;
std::vector<RootDeviceEnvironment> rootDeviceEnvironments{1};
std::unique_ptr<BuiltIns> builtins;
std::unique_ptr<CompilerInterface> compilerInterface;
std::unique_ptr<SourceLevelDebugger> sourceLevelDebugger;
};
} // namespace NEO