Files
compute-runtime/core/execution_environment/execution_environment.h
Maciej Plewka df59101dae Create base class for debugger in core
Resolves: NEO-4176

Change-Id: Iba48676fe145538c8213d21d514be38c702525c9
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2020-02-11 08:38:48 +01:00

60 lines
1.6 KiB
C++

/*
* Copyright (C) 2018-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "core/os_interface/device_factory.h"
#include "core/utilities/reference_tracked_object.h"
#include <mutex>
#include <vector>
namespace NEO {
class BuiltIns;
class CompilerInterface;
class GmmClientContext;
class GmmHelper;
class MemoryManager;
class Debugger;
struct RootDeviceEnvironment;
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;
void initGmm();
void initializeMemoryManager();
void initDebugger();
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;
GmmClientContext *getGmmClientContext() const;
MOCKABLE_VIRTUAL CompilerInterface *getCompilerInterface();
BuiltIns *getBuiltIns();
std::unique_ptr<MemoryManager> memoryManager;
std::vector<std::unique_ptr<RootDeviceEnvironment>> rootDeviceEnvironments;
std::unique_ptr<BuiltIns> builtins;
std::unique_ptr<CompilerInterface> compilerInterface;
std::unique_ptr<Debugger> debugger;
};
} // namespace NEO