/* * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once #include "shared/source/utilities/reference_tracked_object.h" #include namespace NEO { class DirectSubmissionController; class MemoryManager; struct OsEnvironment; struct RootDeviceEnvironment; class ExecutionEnvironment : public ReferenceTrackedObject { public: ExecutionEnvironment(); ~ExecutionEnvironment() override; MOCKABLE_VIRTUAL bool initializeMemoryManager(); void calculateMaxOsContextCount(); virtual void prepareRootDeviceEnvironments(uint32_t numRootDevices); void prepareRootDeviceEnvironment(const uint32_t rootDeviceIndexForReInit); void parseAffinityMask(); void sortNeoDevices(); void setDebuggingEnabled() { debuggingEnabled = true; } bool isDebuggingEnabled() { return debuggingEnabled; } DirectSubmissionController *initializeDirectSubmissionController(); std::unique_ptr memoryManager; std::unique_ptr directSubmissionController; std::unique_ptr osEnvironment; std::vector> rootDeviceEnvironments; void releaseRootDeviceEnvironmentResources(RootDeviceEnvironment *rootDeviceEnvironment); protected: bool debuggingEnabled = false; }; } // namespace NEO