2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2018-09-18 15:11:08 +08:00
|
|
|
* Copyright (C) 2017-2018 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
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
unsigned int getHwContextId() const;
|
|
|
|
static bool osEnabled64kbPages;
|
|
|
|
static bool are64kbPagesEnabled();
|
2018-04-20 20:44:14 +08:00
|
|
|
unsigned int getDeviceHandle() const;
|
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
|
|
|
};
|
|
|
|
} // namespace OCLRT
|