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