Files
compute-runtime/shared/source/os_interface/device_factory.h
Daniel Bermond e0362a7c39 build: add missing headers for GCC 15
For using fixed width integer types[1], the `<cstdint>`[2]
C++ header needs to be explicitly included with GCC 15 due
to changes[3] in libstdc++.

For details, see the documentation[4] about porting to GCC 15.

[1] https://en.cppreference.com/w/cpp/types/integer
[2] https://en.cppreference.com/w/cpp/header/cstdint
[3] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84
[4] https://gcc.gnu.org/gcc-15/porting_to.html#cxx

Signed-off-by: Daniel Bermond <dbermond@archlinux.org>
2025-05-19 15:31:32 +02:00

36 lines
1.5 KiB
C++

/*
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
namespace NEO {
class ExecutionEnvironment;
class Device;
struct HardwareInfo;
const HardwareInfo *getDefaultHwInfo();
bool prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment);
bool prepareDeviceEnvironment(ExecutionEnvironment &executionEnvironment, std::string &osPciPath, const uint32_t rootDeviceIndex);
class DeviceFactory {
public:
static bool prepareDeviceEnvironments(ExecutionEnvironment &executionEnvironment);
static bool prepareDeviceEnvironment(ExecutionEnvironment &executionEnvironment, std::string &osPciPath, const uint32_t rootDeviceIndex);
static bool prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionEnvironment &executionEnvironment);
static std::vector<std::unique_ptr<Device>> createDevices(ExecutionEnvironment &executionEnvironment);
static std::unique_ptr<Device> createDevice(ExecutionEnvironment &executionEnvironment, std::string &osPciPath, const uint32_t rootDeviceIndex);
static bool isHwModeSelected();
static std::unique_ptr<Device> (*createRootDeviceFunc)(ExecutionEnvironment &executionEnvironment, uint32_t rootDeviceIndex);
static bool (*createMemoryManagerFunc)(ExecutionEnvironment &executionEnvironment);
static bool isAllowedDeviceId(uint32_t deviceId, const std::string &deviceIdString);
};
} // namespace NEO