Skip to content

Commit c303c21

Browse files
Add missing pragma once in header files
Signed-off-by: Daniel Chabrowski <[email protected]>
1 parent 00641c9 commit c303c21

File tree

54 files changed

+150
-51
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+150
-51
lines changed

level_zero/api/core/ze_module_api_entrypoints.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "level_zero/core/source/cmdlist/cmdlist.h"
911
#include "level_zero/core/source/kernel/kernel.h"
1012
#include "level_zero/core/source/module/module.h"
1113
#include "level_zero/core/source/module/module_build_log.h"
1214
#include <level_zero/ze_api.h>
1315

14-
#pragma once
15-
1616
namespace L0 {
1717
ze_result_t zeModuleCreate(
1818
ze_context_handle_t hContext,
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
/*
2-
* Copyright (C) 2020 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#pragma once
9+
810
#include <string>
911
#include <unordered_map>
1012

1113
namespace L0 {
1214
std::unordered_map<std::string, void *> getExtensionFunctionsLookupMap();
13-
} // namespace L0
15+
} // namespace L0

level_zero/core/source/helpers/allocation_extensions.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/source/memory_manager/memory_manager.h"
911

1012
#include "level_zero/core/source/driver/driver_handle_imp.h"

level_zero/core/test/aub_tests/fixtures/aub_fixture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
911
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
1012
#include "shared/source/command_stream/command_stream_receiver_with_aub_dump.h"

level_zero/core/test/black_box_tests/common/zello_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include <level_zero/ze_api.h>
911

1012
#include <cstring>

level_zero/core/test/black_box_tests/common/zello_compile.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/offline_compiler/source/ocloc_api.h"
911

1012
#include <level_zero/ze_api.h>
1113

14+
#include <cstdint>
15+
#include <cstring>
16+
#include <string>
17+
#include <vector>
18+
1219
std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &options, std::string &outCompilerLog) {
1320
std::vector<uint8_t> ret;
1421

@@ -40,11 +47,11 @@ std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &o
4047
for (unsigned int i = 0; i < numOutputs; ++i) {
4148
std::string spvExtension = ".spv";
4249
std::string logFileName = "stdout.log";
43-
auto nameLen = strlen(outputNames[i]);
44-
if ((nameLen > spvExtension.size()) && (strstr(&outputNames[i][nameLen - spvExtension.size()], spvExtension.c_str()) != nullptr)) {
50+
auto nameLen = std::strlen(outputNames[i]);
51+
if ((nameLen > spvExtension.size()) && (std::strstr(&outputNames[i][nameLen - spvExtension.size()], spvExtension.c_str()) != nullptr)) {
4552
spirV = outputs[i];
4653
spirVlen = ouputLengths[i];
47-
} else if ((nameLen >= logFileName.size()) && (strstr(outputNames[i], logFileName.c_str()) != nullptr)) {
54+
} else if ((nameLen >= logFileName.size()) && (std::strstr(outputNames[i], logFileName.c_str()) != nullptr)) {
4855
log = reinterpret_cast<const char *>(outputs[i]);
4956
logLen = ouputLengths[i];
5057
break;
@@ -63,4 +70,4 @@ std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &o
6370
ret.assign(spirV, spirV + spirVlen);
6471
oclocFreeOutput(&numOutputs, &outputs, &ouputLengths, &outputNames);
6572
return ret;
66-
}
73+
}

level_zero/core/test/unit_tests/fixtures/memory_ipc_fixture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/source/helpers/file_io.h"
911
#include "shared/source/helpers/string.h"
1012
#include "shared/source/memory_manager/memory_operations_status.h"

level_zero/core/test/unit_tests/mocks/mock_builtin_functions_lib_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "level_zero/core/test/unit_tests/mocks/mock_kernel.h"
911
#include "level_zero/core/test/unit_tests/mocks/mock_module.h"
1012

@@ -55,4 +57,4 @@ struct MockBuiltinFunctionsLibImpl : BuiltinFunctionsLibImpl {
5557
}
5658
};
5759
} // namespace ult
58-
} // namespace L0
60+
} // namespace L0

level_zero/core/test/unit_tests/mocks/mock_builtin_functions_lib_impl_timestamps.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "shared/source/built_ins/built_ins.h"
911

1012
#include "level_zero/core/source/builtin/builtin_functions_lib_impl.h"

level_zero/core/test/unit_tests/mocks/mock_device_for_spirv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
*/
77

8+
#pragma once
9+
810
#include "level_zero/core/source/driver/driver_handle_imp.h"
911
#include "level_zero/core/source/module/module.h"
1012
#include "level_zero/core/test/unit_tests/mocks/mock_device.h"

0 commit comments

Comments
 (0)