2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-01-21 22:24:52 +08:00
|
|
|
* Copyright (C) 2017-2020 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2019-12-11 18:38:44 +08:00
|
|
|
#include <cstdint>
|
2020-02-13 20:26:40 +08:00
|
|
|
#include <memory>
|
2020-02-17 23:14:22 +08:00
|
|
|
#include <vector>
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2020-03-17 14:26:46 +08:00
|
|
|
class ExecutionEnvironment;
|
2020-02-13 20:26:40 +08:00
|
|
|
class HwDeviceId;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
class OSInterface {
|
|
|
|
|
|
|
|
public:
|
|
|
|
class OSInterfaceImpl;
|
|
|
|
OSInterface();
|
2018-03-23 22:55:13 +08:00
|
|
|
virtual ~OSInterface();
|
2017-12-21 07:45:38 +08:00
|
|
|
OSInterface(const OSInterface &) = delete;
|
|
|
|
OSInterface &operator=(const OSInterface &) = delete;
|
|
|
|
|
|
|
|
OSInterfaceImpl *get() const {
|
|
|
|
return osInterfaceImpl;
|
|
|
|
};
|
|
|
|
static bool osEnabled64kbPages;
|
2018-10-12 21:20:02 +08:00
|
|
|
static bool osEnableLocalMemory;
|
2017-12-21 07:45:38 +08:00
|
|
|
static bool are64kbPagesEnabled();
|
2020-09-22 22:29:34 +08:00
|
|
|
static bool newResourceImplicitFlush;
|
|
|
|
static bool gpuIdleImplicitFlush;
|
2019-12-11 18:38:44 +08:00
|
|
|
uint32_t getDeviceHandle() const;
|
2019-10-15 21:05:47 +08:00
|
|
|
void setGmmInputArgs(void *args);
|
2020-03-17 14:26:46 +08:00
|
|
|
static std::vector<std::unique_ptr<HwDeviceId>> discoverDevices(ExecutionEnvironment &executionEnvironment);
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
protected:
|
2018-03-23 22:55:13 +08:00
|
|
|
OSInterfaceImpl *osInterfaceImpl = nullptr;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|