Add missing pragma once in header files

Signed-off-by: Daniel Chabrowski <daniel.chabrowski@intel.com>
This commit is contained in:
Daniel Chabrowski
2022-06-07 09:30:54 +00:00
committed by Compute-Runtime-Automation
parent 00641c9496
commit c303c218be
54 changed files with 150 additions and 51 deletions

View File

@ -5,14 +5,14 @@
*
*/
#pragma once
#include "level_zero/core/source/cmdlist/cmdlist.h"
#include "level_zero/core/source/kernel/kernel.h"
#include "level_zero/core/source/module/module.h"
#include "level_zero/core/source/module/module_build_log.h"
#include <level_zero/ze_api.h>
#pragma once
namespace L0 {
ze_result_t zeModuleCreate(
ze_context_handle_t hContext,

View File

@ -1,13 +1,15 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <string>
#include <unordered_map>
namespace L0 {
std::unordered_map<std::string, void *> getExtensionFunctionsLookupMap();
} // namespace L0
} // namespace L0

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/memory_manager/memory_manager.h"
#include "level_zero/core/source/driver/driver_handle_imp.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include <level_zero/ze_api.h>
#include <cstring>

View File

@ -1,14 +1,21 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/offline_compiler/source/ocloc_api.h"
#include <level_zero/ze_api.h>
#include <cstdint>
#include <cstring>
#include <string>
#include <vector>
std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &options, std::string &outCompilerLog) {
std::vector<uint8_t> ret;
@ -40,11 +47,11 @@ std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &o
for (unsigned int i = 0; i < numOutputs; ++i) {
std::string spvExtension = ".spv";
std::string logFileName = "stdout.log";
auto nameLen = strlen(outputNames[i]);
if ((nameLen > spvExtension.size()) && (strstr(&outputNames[i][nameLen - spvExtension.size()], spvExtension.c_str()) != nullptr)) {
auto nameLen = std::strlen(outputNames[i]);
if ((nameLen > spvExtension.size()) && (std::strstr(&outputNames[i][nameLen - spvExtension.size()], spvExtension.c_str()) != nullptr)) {
spirV = outputs[i];
spirVlen = ouputLengths[i];
} else if ((nameLen >= logFileName.size()) && (strstr(outputNames[i], logFileName.c_str()) != nullptr)) {
} else if ((nameLen >= logFileName.size()) && (std::strstr(outputNames[i], logFileName.c_str()) != nullptr)) {
log = reinterpret_cast<const char *>(outputs[i]);
logLen = ouputLengths[i];
break;
@ -63,4 +70,4 @@ std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &o
ret.assign(spirV, spirV + spirVlen);
oclocFreeOutput(&numOutputs, &outputs, &ouputLengths, &outputNames);
return ret;
}
}

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/helpers/file_io.h"
#include "shared/source/helpers/string.h"
#include "shared/source/memory_manager/memory_operations_status.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "level_zero/core/test/unit_tests/mocks/mock_kernel.h"
#include "level_zero/core/test/unit_tests/mocks/mock_module.h"
@ -55,4 +57,4 @@ struct MockBuiltinFunctionsLibImpl : BuiltinFunctionsLibImpl {
}
};
} // namespace ult
} // namespace L0
} // namespace L0

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/built_ins/built_ins.h"
#include "level_zero/core/source/builtin/builtin_functions_lib_impl.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "level_zero/core/source/driver/driver_handle_imp.h"
#include "level_zero/core/source/module/module.h"
#include "level_zero/core/test/unit_tests/mocks/mock_device.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "level_zero/core/source/module/module_imp.h"
#include "level_zero/core/test/unit_tests/mocks/mock_device.h"
#include "level_zero/core/test/unit_tests/mocks/mock_kernel.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/mocks/mock_compilers.h"
#include "shared/test/common/mocks/mock_device.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "gtest/gtest.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
@ -22,4 +24,4 @@ struct CommandListStatePrefetchXeHpcCore : public ModuleFixture {
void checkIfCommandBufferIsExhaustedWhenPrefetchApiCalledThenStatePrefetchProgrammed(HardwareInfo *hwInfo);
};
} // namespace ult
} // namespace L0
} // namespace L0

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/helpers/topology_map.h"
namespace NEO {

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include <map>
#include <string>
@ -207,4 +209,4 @@ const std::map<std::string, std::map<std::string, uint64_t>> guidToKeyOffsetMap
{"VF1_HBM3_READ", 360},
{"VF1_HBM3_WRITE", 364}}}};
} // namespace L0
} // namespace L0

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2020 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "sysman/scheduler/scheduler_imp.h"
namespace L0 {

View File

@ -5,14 +5,14 @@
*
*/
#pragma once
#include <level_zero/ze_api.h>
#include <level_zero/zet_api.h>
#include <iostream>
#include <vector>
#pragma once
#define VALIDATECALL(myZeCall) \
do { \
if ((myZeCall) != ZE_RESULT_SUCCESS) { \

View File

@ -5,12 +5,12 @@
*
*/
#pragma once
#include "level_zero/tools/test/black_box_tests/zello_metrics/zello_metrics.h"
#include <iostream>
#pragma once
#define MAX_DEVICES_IN_MACHINE (64u)
#define LOG(level) (((level) <= (ZelloMetricsUtility::TestSettings::get())->verboseLevel) \
? (std::cout) \

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/test_macros/mock_method_macros.h"
#include "shared/test/common/test_macros/test.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/test/common/test_macros/test.h"
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/test/common/test_macros/test.h"
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/os_interface/device_factory.h"
#include "shared/source/os_interface/linux/drm_neo.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/mocks/ult_device_factory.h"
#include "shared/test/common/test_macros/test.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_io_functions.h"
#include "shared/test/common/test_macros/test.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/os_interface/device_factory.h"
#include "shared/source/os_interface/os_interface.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "opencl/extensions/public/cl_ext_private.h"
#include "opencl/source/api/api_enter.h"
#include "opencl/source/api/dispatch.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "opencl/source/command_queue/command_queue.h"
#include "opencl/source/kernel/kernel.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "CL/cl.h"
#include "CL/cl_gl_ext.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/os_interface/os_library.h"
#include "GL/gl.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/os_interface/windows/windows_wrapper.h"
#include <cstdint>

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "CL/cl.h"
#include "CL/cl_va_api_media_sharing_intel.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/command_stream_receiver.h"
#include "shared/source/helpers/ptr_math.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/gmm_helper/gmm_helper.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "opencl/test/unit_test/aub_tests/command_queue/command_enqueue_fixture.h"

View File

@ -1,15 +1,15 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <string>
#include <vector>
#pragma once
namespace NEO {
std::vector<std::string> getBuiltInFileNames(bool imagesSupport);
std::string getBuiltInHashFileName(uint64_t hash, bool imagesSupport);

View File

@ -5,7 +5,10 @@
*
*/
#pragma once
#include <stdint.h>
namespace NEO {
int32_t getNewKernelArbitrationPolicy(uint32_t policy);
} // namespace NEO
} // namespace NEO

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/mocks/mock_gmm.h"
#include "shared/test/common/test_macros/test.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include <memory>
namespace NEO {

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/default_hw_info.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2019-2021 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/built_ins/built_ins.h"
#include "shared/source/command_container/command_encoder.h"
#include "shared/test/common/mocks/mock_graphics_allocation.h"

View File

@ -5,4 +5,6 @@
*
*/
#pragma once
const char *realFunction();

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/mock_memory_manager.h"
#include "shared/test/common/test_macros/test.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "opencl/source/sharings/sharing_factory.h"
class SharingFactoryMock : public NEO::SharingFactory {

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/test_macros/test.h"
#include "opencl/test/unit_test/offline_compiler/mock/mock_offline_compiler.h"
@ -20,4 +22,4 @@ struct OclocProductConfigTests : public ::testing::TestWithParam<std::tuple<PROD
PRODUCT_FAMILY productFamily;
std::unique_ptr<MockOfflineCompiler> mockOfflineCompiler;
};
} // namespace NEO
} // namespace NEO

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2018-2020 Intel Corporation
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/os_interface/windows/debug_registry_reader.h"
#include "opencl/source/os_interface/ocl_reg_path.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/variable_backup.h"
#include "shared/test/common/mocks/mock_device.h"
#include "shared/test/common/mocks/mock_gmm.h"

View File

@ -1,10 +1,12 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/test/common/helpers/execution_environment_helper.h"
#include "shared/test/common/mocks/mock_builtins.h"
#include "shared/test/common/mocks/mock_csr.h"

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/test/common/helpers/debug_manager_state_restore.h"
#include "shared/test/common/helpers/ult_hw_config.h"
@ -18,4 +20,4 @@ struct HwHelperTestsXeHpcCore : public ClDeviceFixture {
DebugManagerStateRestore restore;
VariableBackup<UltHwConfig> backup{&ultHwConfig};
};
} // namespace NEO
} // namespace NEO

View File

@ -5,6 +5,8 @@
*
*/
#pragma once
#include "shared/offline_compiler/source/decoder/helper.h"
#include "shared/source/helpers/hw_info.h"
@ -19,8 +21,6 @@
#include <string>
#include <vector>
#pragma once
static constexpr auto *oclocStdoutLogName = "stdout.log";
struct Source {

View File

@ -1,28 +1,28 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/hw_info.h"
#include <string>
#pragma once
/*
* AIL (Application Intelligence Layer) is a set of per-application controls that influence driver behavior.
* The primary goal is to improve user experience and/or performance.
*
* AIL provides application detection mechanism based on running processes in the system.
* Mechanism works on Windows and Linux, is flexible and easily extendable to new applications.
*
* E.g. AIL can detect running Blender application and enable fp64 emulation on hardware
*
* E.g. AIL can detect running Blender application and enable fp64 emulation on hardware
* that does not support native fp64.
*
*
* Disclaimer: we should never use this for benchmarking or conformance purposes - this would be cheating.
*
*
*/
namespace NEO {

View File

@ -5,12 +5,14 @@
*
*/
#pragma once
#include "shared/source/utilities/arrayref.h"
#include <string>
#include <unordered_map>
#include <vector>
#pragma once
namespace NEO {
struct KernelDescriptor;
@ -70,4 +72,4 @@ uint32_t resolveExtFuncDependencies(ExternalFunctionInfosT externalFunctionInfos
uint32_t resolveKernelDependencies(ExternalFunctionInfosT externalFunctionInfos, FuncNameToIdMapT &funcNameToId, KernelDependenciesT kernelDependencies, KernelDescriptorMapT &nameToKernelDescriptor);
} // namespace NEO
} // namespace NEO

View File

@ -5,9 +5,10 @@
*
*/
#include <stdint.h>
#pragma once
#include <stdint.h>
enum InternalMemoryType : uint32_t {
NOT_SPECIFIED = 0b0,
SVM = 0b1,

View File

@ -5,12 +5,12 @@
*
*/
#pragma once
#include "shared/test/common/mocks/mock_wddm.h"
#include "KmEscape.h"
#pragma once
namespace NEO {
struct WddmEuDebugInterfaceMock : public WddmMock {