diff --git a/.clang-format b/.clang-format index 4a51359252..0cea56ea39 100644 --- a/.clang-format +++ b/.clang-format @@ -50,7 +50,7 @@ ExperimentalAutoDetectBinPacking: false ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] IncludeBlocks: Regroup IncludeCategories: - - Regex: '^.(common|core|documentation|manifests|offline_compiler|public|runtime|scripts|unit_tests)/' + - Regex: '^.(core|documentation|manifests|offline_compiler|public|runtime|scripts|unit_tests)/' Priority: 1 - Regex: '^"test\.h"$' Priority: 1 diff --git a/.clang-tidy b/.clang-tidy index fc26a15239..f3691c74a5 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,readability-identifier-naming,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines diff --git a/core/compiler_interface/linker.cpp b/core/compiler_interface/linker.cpp index f76751f066..bd5cf86a61 100644 --- a/core/compiler_interface/linker.cpp +++ b/core/compiler_interface/linker.cpp @@ -7,9 +7,9 @@ #include "linker.h" -#include "common/compiler_support.h" #include "core/helpers/debug_helpers.h" #include "core/helpers/ptr_math.h" +#include "core/utilities/compiler_support.h" #include "RelocationInfo.h" diff --git a/core/device_binary_format/device_binary_format_ocl_elf.cpp b/core/device_binary_format/device_binary_format_ocl_elf.cpp index 1294c00a4a..cfe5c36ace 100644 --- a/core/device_binary_format/device_binary_format_ocl_elf.cpp +++ b/core/device_binary_format/device_binary_format_ocl_elf.cpp @@ -5,12 +5,12 @@ * */ -#include "common/compiler_support.h" #include "core/compiler_interface/intermediate_representations.h" #include "core/device_binary_format/device_binary_formats.h" #include "core/device_binary_format/elf/elf_decoder.h" #include "core/device_binary_format/elf/elf_encoder.h" #include "core/device_binary_format/elf/ocl_elf.h" +#include "core/utilities/compiler_support.h" #include diff --git a/core/helpers/CMakeLists.txt b/core/helpers/CMakeLists.txt index a0064838f2..c4ea2a2a70 100644 --- a/core/helpers/CMakeLists.txt +++ b/core/helpers/CMakeLists.txt @@ -12,6 +12,7 @@ set(NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/array_count.h ${CMAKE_CURRENT_SOURCE_DIR}/aux_translation.h ${CMAKE_CURRENT_SOURCE_DIR}/basic_math.h + ${CMAKE_CURRENT_SOURCE_DIR}/bit_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_base.inl ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_bdw_plus.inl ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper.cpp diff --git a/common/helpers/bit_helpers.h b/core/helpers/bit_helpers.h similarity index 95% rename from common/helpers/bit_helpers.h rename to core/helpers/bit_helpers.h index c02b317c6a..b6eb7443eb 100644 --- a/common/helpers/bit_helpers.h +++ b/core/helpers/bit_helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Intel Corporation + * Copyright (C) 2019-2020 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/core/helpers/hash.h b/core/helpers/hash.h index 29b0ca521b..4153ed0c71 100644 --- a/core/helpers/hash.h +++ b/core/helpers/hash.h @@ -1,13 +1,13 @@ /* - * Copyright (C) 2017-2019 Intel Corporation + * Copyright (C) 2017-2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "common/compiler_support.h" #include "core/helpers/aligned_memory.h" +#include "core/utilities/compiler_support.h" #include diff --git a/core/memory_manager/memory_manager.cpp b/core/memory_manager/memory_manager.cpp index 04f627c33d..bdad400a46 100644 --- a/core/memory_manager/memory_manager.cpp +++ b/core/memory_manager/memory_manager.cpp @@ -7,7 +7,6 @@ #include "core/memory_manager/memory_manager.h" -#include "common/compiler_support.h" #include "core/debug_settings/debug_settings_manager.h" #include "core/execution_environment/root_device_environment.h" #include "core/gmm_helper/gmm.h" @@ -26,6 +25,7 @@ #include "core/memory_manager/internal_allocation_storage.h" #include "core/os_interface/os_context.h" #include "core/os_interface/os_interface.h" +#include "core/utilities/compiler_support.h" #include "core/utilities/stackvec.h" #include "runtime/command_stream/command_stream_receiver.h" diff --git a/core/memory_manager/memory_manager.h b/core/memory_manager/memory_manager.h index fbc6761251..1ee22d7e5e 100644 --- a/core/memory_manager/memory_manager.h +++ b/core/memory_manager/memory_manager.h @@ -6,9 +6,9 @@ */ #pragma once -#include "common/helpers/bit_helpers.h" #include "core/command_stream/preemption_mode.h" #include "core/helpers/aligned_memory.h" +#include "core/helpers/bit_helpers.h" #include "core/helpers/common_types.h" #include "core/helpers/engine_control.h" #include "core/memory_manager/allocation_properties.h" diff --git a/core/unit_tests/.clang-tidy b/core/unit_tests/.clang-tidy index 43f59e172b..4365adcff2 100644 --- a/core/unit_tests/.clang-tidy +++ b/core/unit_tests/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-unix.MismatchedDeallocator,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-optin.cplusplus.VirtualCall' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines diff --git a/core/unit_tests/utilities/.clang-tidy b/core/unit_tests/utilities/.clang-tidy index 628f8c0d3a..2b736b5b62 100644 --- a/core/unit_tests/utilities/.clang-tidy +++ b/core/unit_tests/utilities/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.UndefinedBinaryOperatorResult' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines diff --git a/core/utilities/CMakeLists.txt b/core/utilities/CMakeLists.txt index 7f64ab14dd..58053655d5 100644 --- a/core/utilities/CMakeLists.txt +++ b/core/utilities/CMakeLists.txt @@ -9,6 +9,7 @@ set(NEO_CORE_UTILITIES ${CMAKE_CURRENT_SOURCE_DIR}/api_intercept.h ${CMAKE_CURRENT_SOURCE_DIR}/arrayref.h ${CMAKE_CURRENT_SOURCE_DIR}/cpuintrinsics.h + ${CMAKE_CURRENT_SOURCE_DIR}/compiler_support.h ${CMAKE_CURRENT_SOURCE_DIR}/const_stringref.h ${CMAKE_CURRENT_SOURCE_DIR}/cpu_info.h ${CMAKE_CURRENT_SOURCE_DIR}/debug_file_reader.cpp diff --git a/common/compiler_support.h b/core/utilities/compiler_support.h similarity index 86% rename from common/compiler_support.h rename to core/utilities/compiler_support.h index 4021bb718b..c3f2b1c5f2 100644 --- a/common/compiler_support.h +++ b/core/utilities/compiler_support.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * diff --git a/runtime/helpers/mem_properties_parser_helper.h b/runtime/helpers/mem_properties_parser_helper.h index 2473574979..f882c036b0 100644 --- a/runtime/helpers/mem_properties_parser_helper.h +++ b/runtime/helpers/mem_properties_parser_helper.h @@ -6,7 +6,7 @@ */ #pragma once -#include "common/helpers/bit_helpers.h" +#include "core/helpers/bit_helpers.h" #include "core/memory_manager/allocation_properties.h" #include "public/cl_ext_private.h" diff --git a/runtime/helpers/memory_properties_flags_helpers_base.inl b/runtime/helpers/memory_properties_flags_helpers_base.inl index 2609176a6f..c6020b65ad 100644 --- a/runtime/helpers/memory_properties_flags_helpers_base.inl +++ b/runtime/helpers/memory_properties_flags_helpers_base.inl @@ -5,7 +5,7 @@ * */ -#include "common/helpers/bit_helpers.h" +#include "core/helpers/bit_helpers.h" #include "public/cl_ext_private.h" #include "runtime/helpers/memory_properties_flags_helpers.h" diff --git a/runtime/instrumentation/.clang-tidy b/runtime/instrumentation/.clang-tidy index ef415f9e74..7575d9207d 100644 --- a/runtime/instrumentation/.clang-tidy +++ b/runtime/instrumentation/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,readability-identifier-naming,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines diff --git a/runtime/mem_obj/buffer_base.inl b/runtime/mem_obj/buffer_base.inl index 3de612a57e..8a2a2978d5 100644 --- a/runtime/mem_obj/buffer_base.inl +++ b/runtime/mem_obj/buffer_base.inl @@ -5,11 +5,11 @@ * */ -#include "common/helpers/bit_helpers.h" #include "core/execution_environment/execution_environment.h" #include "core/gmm_helper/gmm.h" #include "core/gmm_helper/resource_info.h" #include "core/helpers/aligned_memory.h" +#include "core/helpers/bit_helpers.h" #include "core/helpers/hw_cmds.h" #include "runtime/helpers/surface_formats.h" #include "runtime/mem_obj/buffer.h" diff --git a/runtime/mem_obj/image.cpp b/runtime/mem_obj/image.cpp index 8d8e3b277a..ea6310daac 100644 --- a/runtime/mem_obj/image.cpp +++ b/runtime/mem_obj/image.cpp @@ -7,7 +7,6 @@ #include "runtime/mem_obj/image.h" -#include "common/compiler_support.h" #include "core/debug_settings/debug_settings_manager.h" #include "core/gmm_helper/gmm.h" #include "core/gmm_helper/gmm_types_converter.h" @@ -20,6 +19,7 @@ #include "core/helpers/ptr_math.h" #include "core/helpers/string.h" #include "core/memory_manager/memory_manager.h" +#include "core/utilities/compiler_support.h" #include "runtime/command_queue/command_queue.h" #include "runtime/context/context.h" #include "runtime/device/cl_device.h" diff --git a/runtime/mem_obj/mem_obj.cpp b/runtime/mem_obj/mem_obj.cpp index da13ab1248..5522533f90 100644 --- a/runtime/mem_obj/mem_obj.cpp +++ b/runtime/mem_obj/mem_obj.cpp @@ -7,10 +7,10 @@ #include "runtime/mem_obj/mem_obj.h" -#include "common/helpers/bit_helpers.h" #include "core/gmm_helper/gmm.h" #include "core/gmm_helper/resource_info.h" #include "core/helpers/aligned_memory.h" +#include "core/helpers/bit_helpers.h" #include "core/helpers/get_info.h" #include "core/memory_manager/deferred_deleter.h" #include "core/memory_manager/internal_allocation_storage.h" diff --git a/runtime/mem_obj/mem_obj_helper.h b/runtime/mem_obj/mem_obj_helper.h index c13ebb93da..bd7b26746a 100644 --- a/runtime/mem_obj/mem_obj_helper.h +++ b/runtime/mem_obj/mem_obj_helper.h @@ -6,7 +6,7 @@ */ #pragma once -#include "common/helpers/bit_helpers.h" +#include "core/helpers/bit_helpers.h" #include "core/memory_manager/memory_manager.h" #include "core/memory_manager/unified_memory_manager.h" #include "public/cl_ext_private.h" diff --git a/unit_tests/.clang-tidy b/unit_tests/.clang-tidy index 43f59e172b..4365adcff2 100644 --- a/unit_tests/.clang-tidy +++ b/unit_tests/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-core.CallAndMessage,-clang-analyzer-core.uninitialized.Assign,-clang-analyzer-unix.MismatchedDeallocator,-clang-analyzer-core.NonNullParamChecker,-clang-analyzer-core.NullDereference,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-optin.cplusplus.VirtualCall' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines diff --git a/unit_tests/helpers/bit_helpers_tests.cpp b/unit_tests/helpers/bit_helpers_tests.cpp index ed2b9955ef..e8528c1e4d 100644 --- a/unit_tests/helpers/bit_helpers_tests.cpp +++ b/unit_tests/helpers/bit_helpers_tests.cpp @@ -1,11 +1,11 @@ /* - * Copyright (C) 2019 Intel Corporation + * Copyright (C) 2019-2020 Intel Corporation * * SPDX-License-Identifier: MIT * */ -#include "common/helpers/bit_helpers.h" +#include "core/helpers/bit_helpers.h" #include "gtest/gtest.h" diff --git a/unit_tests/os_interface/linux/.clang-tidy b/unit_tests/os_interface/linux/.clang-tidy index d825181b92..a06dbe4ec3 100644 --- a/unit_tests/os_interface/linux/.clang-tidy +++ b/unit_tests/os_interface/linux/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-optin.performance.Padding,-clang-analyzer-cplusplus.NewDelete,-clang-analyzer-cplusplus.NewDeleteLeaks,-clang-analyzer-optin.cplusplus.VirtualCall' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines diff --git a/unit_tests/utilities/.clang-tidy b/unit_tests/utilities/.clang-tidy index 8435d77e9c..e0370eae27 100644 --- a/unit_tests/utilities/.clang-tidy +++ b/unit_tests/utilities/.clang-tidy @@ -1,7 +1,7 @@ --- Checks: 'clang-diagnostic-*,clang-analyzer-*,google-default-arguments,modernize-use-override,modernize-use-default-member-init,-clang-analyzer-alpha*,readability-identifier-naming,-clang-analyzer-core.UndefinedBinaryOperatorResult' # WarningsAsErrors: '.*' -HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/|/common/' +HeaderFilterRegex: '/runtime/|/core/|/offline_compiler/' AnalyzeTemporaryDtors: false CheckOptions: - key: google-readability-braces-around-statements.ShortStatementLines