2020-01-12 01:25:26 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/compiler_interface/linker.h"
|
2020-01-12 01:25:26 +08:00
|
|
|
|
2020-01-26 02:18:48 +08:00
|
|
|
#include <cstddef>
|
2020-01-12 01:25:26 +08:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
struct KernelInfo;
|
|
|
|
|
|
|
|
struct ProgramInfo {
|
|
|
|
ProgramInfo() = default;
|
|
|
|
ProgramInfo(ProgramInfo &&) = default;
|
|
|
|
ProgramInfo &operator=(ProgramInfo &&) = default;
|
2020-01-27 17:10:54 +08:00
|
|
|
ProgramInfo(const ProgramInfo &) = delete;
|
|
|
|
ProgramInfo &operator=(const ProgramInfo &) = delete;
|
2020-01-12 01:25:26 +08:00
|
|
|
~ProgramInfo();
|
|
|
|
|
|
|
|
struct GlobalSurfaceInfo {
|
|
|
|
const void *initData = nullptr;
|
|
|
|
size_t size = 0U;
|
|
|
|
};
|
|
|
|
|
|
|
|
void prepareLinkerInputStorage() {
|
|
|
|
if (this->linkerInput == nullptr) {
|
|
|
|
this->linkerInput = std::make_unique<LinkerInput>();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GlobalSurfaceInfo globalConstants;
|
|
|
|
GlobalSurfaceInfo globalVariables;
|
|
|
|
std::unique_ptr<LinkerInput> linkerInput;
|
|
|
|
|
|
|
|
std::vector<KernelInfo *> kernelInfos;
|
|
|
|
};
|
|
|
|
|
2020-01-26 02:18:48 +08:00
|
|
|
size_t getMaxInlineSlmNeeded(const ProgramInfo &programInfo);
|
|
|
|
bool requiresLocalMemoryWindowVA(const ProgramInfo &programInfo);
|
|
|
|
|
2020-01-12 01:25:26 +08:00
|
|
|
} // namespace NEO
|