diff --git a/opencl/source/api/api_enter.h b/opencl/source/api/api_enter.h index aba6ed43b6..3e3ef12204 100644 --- a/opencl/source/api/api_enter.h +++ b/opencl/source/api/api_enter.h @@ -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/utilities/logger.h" #include "shared/source/utilities/perf_profiler.h" diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index 5d9ff12eaa..f7e2f3a58d 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -21,6 +21,7 @@ #include "driver_version.h" +#include #include namespace NEO { diff --git a/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp b/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp index f7fc21e931..e05e06586f 100644 --- a/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp +++ b/opencl/test/unit_test/offline_compiler/decoder/encoder_tests.cpp @@ -6,6 +6,7 @@ */ #include "shared/offline_compiler/source/decoder/binary_decoder.h" +#include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/array_count.h" #include "shared/test/common/helpers/test_files.h" @@ -576,4 +577,4 @@ TEST(EncoderTests, WhenProcessingDeviceBinaryAndAsmIsAvailableThenAseembleItWith EXPECT_EQ(encoder.filesMap["kernel_KernelHeap.asm"], encoder.getMockIga()->receivedAsm); } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/opencl/test/unit_test/os_interface/linux/device_command_stream_fixture_context.cpp b/opencl/test/unit_test/os_interface/linux/device_command_stream_fixture_context.cpp index 5fe4c8443d..05df94effe 100644 --- a/opencl/test/unit_test/os_interface/linux/device_command_stream_fixture_context.cpp +++ b/opencl/test/unit_test/os_interface/linux/device_command_stream_fixture_context.cpp @@ -11,6 +11,8 @@ #include "third_party/uapi/prelim/drm/i915_drm.h" +#include + int DrmMockCustomPrelimContext::ioctlExtra(unsigned long request, void *arg) { switch (request) { case PRELIM_DRM_IOCTL_I915_GEM_CREATE_EXT: { diff --git a/shared/offline_compiler/source/queries.h b/shared/offline_compiler/source/queries.h index 979f29c87e..0ef2081f94 100644 --- a/shared/offline_compiler/source/queries.h +++ b/shared/offline_compiler/source/queries.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include "shared/source/utilities/const_stringref.h" namespace NEO { diff --git a/shared/source/aub/aub_helper_add_mmio.cpp b/shared/source/aub/aub_helper_add_mmio.cpp index a4dbf3e4ce..21c94ab4e1 100644 --- a/shared/source/aub/aub_helper_add_mmio.cpp +++ b/shared/source/aub/aub_helper_add_mmio.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,8 @@ #include "third_party/aub_stream/headers/aubstream.h" +#include + namespace NEO { MMIOList AubHelper::getAdditionalMmioList() { diff --git a/shared/source/command_container/cmdcontainer.cpp b/shared/source/command_container/cmdcontainer.cpp index 7be04b9f7c..d9f66adf5f 100644 --- a/shared/source/command_container/cmdcontainer.cpp +++ b/shared/source/command_container/cmdcontainer.cpp @@ -15,6 +15,7 @@ #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/heap_helper.h" #include "shared/source/helpers/hw_helper.h" +#include "shared/source/helpers/string.h" #include "shared/source/indirect_heap/indirect_heap.h" #include "shared/source/memory_manager/allocations_list.h" #include "shared/source/memory_manager/memory_manager.h" diff --git a/shared/source/command_container/walker_partition_xehp_and_later.h b/shared/source/command_container/walker_partition_xehp_and_later.h index f43073f959..5e86f566ed 100644 --- a/shared/source/command_container/walker_partition_xehp_and_later.h +++ b/shared/source/command_container/walker_partition_xehp_and_later.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/command_container/command_encoder.h" #include "shared/source/command_container/walker_partition_interface.h" #include "shared/source/debug_settings/debug_settings_manager.h" +#include "shared/source/helpers/aligned_memory.h" #include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/hw_info.h" @@ -486,9 +487,9 @@ void programPartitionedWalker(void *&inputAddress, uint32_t &totalBytesProgramme //inital setup section 1. MI_LOAD_REGISTER(PREDICATION_MASK, active partition mask ) //loop 1 - loop as long as there are partitions to be serviced -2. MI_ATOMIC_INC( ATOMIC LOCATION #31 within CMD buffer ) +2. MI_ATOMIC_INC( ATOMIC LOCATION #31 within CMD buffer ) 3. MI_LOAD_REGISTER_REG ( ATOMIC RESULT -> WPARID ) -4. MI_SET_PREDICATE( WPARID MODE ) +4. MI_SET_PREDICATE( WPARID MODE ) 5. BATCH_BUFFER_START( LOCATION #28 ) // this will not be executed if partition outside of active virtual partitions //loop 1 ends here, if we are here it means there are no more partitions 6. MI_SET_PREDICATE ( OFF ) diff --git a/shared/source/command_stream/linear_stream.cpp b/shared/source/command_stream/linear_stream.cpp index 8ce2286a55..27f7730d97 100644 --- a/shared/source/command_stream/linear_stream.cpp +++ b/shared/source/command_stream/linear_stream.cpp @@ -12,7 +12,7 @@ namespace NEO { LinearStream::LinearStream(GraphicsAllocation *gfxAllocation, void *buffer, size_t bufferSize) - : sizeUsed(0), maxAvailableSpace(bufferSize), buffer(buffer), graphicsAllocation(gfxAllocation) { + : maxAvailableSpace(bufferSize), buffer(buffer), graphicsAllocation(gfxAllocation) { } LinearStream::LinearStream(void *buffer, size_t bufferSize) @@ -20,20 +20,13 @@ LinearStream::LinearStream(void *buffer, size_t bufferSize) } LinearStream::LinearStream(GraphicsAllocation *gfxAllocation) - : sizeUsed(0), graphicsAllocation(gfxAllocation) { + : graphicsAllocation(gfxAllocation) { if (gfxAllocation) { maxAvailableSpace = gfxAllocation->getUnderlyingBufferSize(); buffer = gfxAllocation->getUnderlyingBuffer(); - } else { - maxAvailableSpace = 0; - buffer = nullptr; } } -LinearStream::LinearStream() - : LinearStream(nullptr) { -} - LinearStream::LinearStream(void *buffer, size_t bufferSize, CommandContainer *cmdContainer, size_t batchBufferEndSize) : LinearStream(buffer, bufferSize) { this->cmdContainer = cmdContainer; diff --git a/shared/source/command_stream/linear_stream.h b/shared/source/command_stream/linear_stream.h index 3f82e857c5..59aa7fd650 100644 --- a/shared/source/command_stream/linear_stream.h +++ b/shared/source/command_stream/linear_stream.h @@ -8,9 +8,7 @@ #pragma once #include "shared/source/command_container/cmdcontainer.h" #include "shared/source/helpers/debug_helpers.h" -#include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/ptr_math.h" -#include "shared/source/helpers/string.h" #include #include @@ -22,11 +20,15 @@ class GraphicsAllocation; class LinearStream { public: virtual ~LinearStream() = default; - LinearStream(); + LinearStream() = default; LinearStream(void *buffer, size_t bufferSize); - LinearStream(GraphicsAllocation *buffer); + LinearStream(GraphicsAllocation *gfxAllocation); LinearStream(GraphicsAllocation *gfxAllocation, void *buffer, size_t bufferSize); LinearStream(void *buffer, size_t bufferSize, CommandContainer *cmdContainer, size_t batchBufferEndSize); + + LinearStream(const LinearStream &) = delete; + LinearStream &operator=(const LinearStream &) = delete; + void *getCpuBase() const; void *getSpace(size_t size); size_t getMaxAvailableSpace() const; @@ -48,13 +50,13 @@ class LinearStream { } protected: - std::atomic sizeUsed; - size_t maxAvailableSpace; - void *buffer; - GraphicsAllocation *graphicsAllocation; - CommandContainer *cmdContainer = nullptr; - size_t batchBufferEndSize = 0; - uint64_t gpuBase = 0; + std::atomic sizeUsed{0}; + size_t maxAvailableSpace{0}; + void *buffer{nullptr}; + GraphicsAllocation *graphicsAllocation{nullptr}; + CommandContainer *cmdContainer{nullptr}; + size_t batchBufferEndSize{0}; + uint64_t gpuBase{0}; }; inline void *LinearStream::getCpuBase() const { diff --git a/shared/source/command_stream/stream_properties.cpp b/shared/source/command_stream/stream_properties.cpp index 2bf273a584..63f4f5f771 100644 --- a/shared/source/command_stream/stream_properties.cpp +++ b/shared/source/command_stream/stream_properties.cpp @@ -8,6 +8,7 @@ #include "shared/source/command_stream/stream_properties.h" #include "shared/source/command_stream/thread_arbitration_policy.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/kernel/grf_config.h" #include "shared/source/os_interface/hw_info_config.h" diff --git a/shared/source/command_stream/thread_arbitration_policy.h b/shared/source/command_stream/thread_arbitration_policy.h index e53d4ad91a..98c6e446ac 100644 --- a/shared/source/command_stream/thread_arbitration_policy.h +++ b/shared/source/command_stream/thread_arbitration_policy.h @@ -7,16 +7,15 @@ #pragma once -#include -namespace NEO { -namespace ThreadArbitrationPolicy { +#include -enum : int32_t { +namespace NEO { + +enum ThreadArbitrationPolicy : int32_t { AgeBased = 0, RoundRobin = 1, RoundRobinAfterDependency = 2, NotPresent = -1 }; -} // namespace ThreadArbitrationPolicy } // namespace NEO diff --git a/shared/source/compiler_interface/oclc_extensions.cpp b/shared/source/compiler_interface/oclc_extensions.cpp index 06dff2efaf..919d7bde51 100644 --- a/shared/source/compiler_interface/oclc_extensions.cpp +++ b/shared/source/compiler_interface/oclc_extensions.cpp @@ -11,6 +11,7 @@ #include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/string.h" +#include #include namespace NEO { diff --git a/shared/source/debug_settings/debug_settings_manager.cpp b/shared/source/debug_settings/debug_settings_manager.cpp index 2230e9f6ed..5d585eb2b7 100644 --- a/shared/source/debug_settings/debug_settings_manager.cpp +++ b/shared/source/debug_settings/debug_settings_manager.cpp @@ -15,6 +15,7 @@ #include "shared/source/utilities/debug_settings_reader_creator.h" #include +#include #include #include diff --git a/shared/source/debug_settings/debug_settings_manager.h b/shared/source/debug_settings/debug_settings_manager.h index 815474e1c3..49d2799d79 100644 --- a/shared/source/debug_settings/debug_settings_manager.h +++ b/shared/source/debug_settings/debug_settings_manager.h @@ -6,13 +6,10 @@ */ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include #include -#include enum class DebugFunctionalityLevel { None, // Debug functionality disabled @@ -127,8 +124,6 @@ class DebugSettingsManager { protected: std::unique_ptr readerImpl; - std::mutex mtx; - std::string logFileName; bool isLoopAtDriverInitEnabled() const { auto loopingEnabled = flags.LoopAtDriverInit.get(); diff --git a/shared/source/device/device.h b/shared/source/device/device.h index bf53ccaf1f..7845a9db39 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -16,6 +16,7 @@ #include "shared/source/helpers/engine_control.h" #include "shared/source/helpers/engine_node_helper.h" #include "shared/source/helpers/hw_info.h" +#include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/source/os_interface/performance_counters.h" #include "shared/source/program/sync_buffer_handler.h" diff --git a/shared/source/device/device_get_device_name.cpp b/shared/source/device/device_get_device_name.cpp index 4b1d9bf270..939a28401f 100644 --- a/shared/source/device/device_get_device_name.cpp +++ b/shared/source/device/device_get_device_name.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,6 +8,8 @@ #include "shared/source/device/device.h" #include "shared/source/helpers/hw_info.h" +#include + namespace NEO { const std::string Device::getDeviceName(const HardwareInfo &hwInfo) const { diff --git a/shared/source/device_binary_format/debug_zebin.h b/shared/source/device_binary_format/debug_zebin.h index 691b8ffbe3..dfd233c82d 100644 --- a/shared/source/device_binary_format/debug_zebin.h +++ b/shared/source/device_binary_format/debug_zebin.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/device_binary_format/elf/zebin_elf.h" #include "shared/source/utilities/arrayref.h" #include "shared/source/utilities/stackvec.h" diff --git a/shared/source/device_binary_format/patchtokens_decoder.cpp b/shared/source/device_binary_format/patchtokens_decoder.cpp index 9284aaa0d8..619d7a9db5 100644 --- a/shared/source/device_binary_format/patchtokens_decoder.cpp +++ b/shared/source/device_binary_format/patchtokens_decoder.cpp @@ -11,6 +11,7 @@ #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/hash.h" #include "shared/source/helpers/ptr_math.h" +#include "shared/source/utilities/logger.h" #include diff --git a/shared/source/direct_submission/direct_submission_hw.h b/shared/source/direct_submission/direct_submission_hw.h index 3e1be2a0c4..462b59cca1 100644 --- a/shared/source/direct_submission/direct_submission_hw.h +++ b/shared/source/direct_submission/direct_submission_hw.h @@ -9,6 +9,7 @@ #include "shared/source/command_stream/linear_stream.h" #include "shared/source/helpers/completion_stamp.h" #include "shared/source/helpers/constants.h" +#include "shared/source/helpers/hw_helper.h" #include "shared/source/utilities/stackvec.h" #include diff --git a/shared/source/dll/create_deferred_deleter.cpp b/shared/source/dll/create_deferred_deleter.cpp index 6ca5276240..b40ccf175c 100644 --- a/shared/source/dll/create_deferred_deleter.cpp +++ b/shared/source/dll/create_deferred_deleter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,4 +11,4 @@ namespace NEO { std::unique_ptr createDeferredDeleter() { return std::unique_ptr(new DeferredDeleter()); } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/gmm_helper/gmm_helper.cpp b/shared/source/gmm_helper/gmm_helper.cpp index e56c44c2f6..9c83db4995 100644 --- a/shared/source/gmm_helper/gmm_helper.cpp +++ b/shared/source/gmm_helper/gmm_helper.cpp @@ -7,6 +7,7 @@ #include "shared/source/gmm_helper/gmm_helper.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/gmm_helper/client_context/gmm_client_context.h" #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/hw_helper.h" diff --git a/shared/source/helpers/affinity_mask.h b/shared/source/helpers/affinity_mask.h index 8ba80e8853..6d254df163 100644 --- a/shared/source/helpers/affinity_mask.h +++ b/shared/source/helpers/affinity_mask.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,12 +7,10 @@ #pragma once -#include "shared/source/helpers/constants.h" -#include "shared/source/helpers/debug_helpers.h" +#include "shared/source/helpers/common_types.h" -#include #include -#include +#include #include namespace NEO { diff --git a/shared/source/helpers/aligned_memory.h b/shared/source/helpers/aligned_memory.h index 3ea0caf63b..881216b1f5 100644 --- a/shared/source/helpers/aligned_memory.h +++ b/shared/source/helpers/aligned_memory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -16,6 +16,7 @@ #include #include #include +#include #ifdef _MSC_VER #define ALIGNAS(x) __declspec(align(x)) diff --git a/shared/source/helpers/api_specific_config.h b/shared/source/helpers/api_specific_config.h index 3d2f8e744e..d528a9d908 100644 --- a/shared/source/helpers/api_specific_config.h +++ b/shared/source/helpers/api_specific_config.h @@ -1,14 +1,14 @@ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once #include #include -#pragma once namespace NEO { struct ApiSpecificConfig { enum ApiType { OCL, diff --git a/shared/source/helpers/app_resource_defines.h b/shared/source/helpers/app_resource_defines.h index 81fa439a2c..db97c7248d 100644 --- a/shared/source/helpers/app_resource_defines.h +++ b/shared/source/helpers/app_resource_defines.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,7 +7,6 @@ #pragma once #include -#include namespace NEO { namespace AppResourceDefines { diff --git a/shared/source/helpers/app_resource_helper.h b/shared/source/helpers/app_resource_helper.h index 657ab3b1da..26a676976f 100644 --- a/shared/source/helpers/app_resource_helper.h +++ b/shared/source/helpers/app_resource_helper.h @@ -5,7 +5,11 @@ * */ -#include "shared/source/memory_manager/graphics_allocation.h" +#pragma once + +#include "shared/source/memory_manager/allocation_type.h" + +#include namespace NEO { struct AppResourceHelper { @@ -13,5 +17,4 @@ struct AppResourceHelper { static const char *getResourceTagStr(AllocationType type); static void copyResourceTagStr(char *dst, AllocationType type, size_t size); }; - } // namespace NEO diff --git a/shared/source/helpers/bindless_heaps_helper.h b/shared/source/helpers/bindless_heaps_helper.h index 2961ad92b5..49ab6c3378 100644 --- a/shared/source/helpers/bindless_heaps_helper.h +++ b/shared/source/helpers/bindless_heaps_helper.h @@ -8,7 +8,6 @@ #pragma once #include "shared/source/helpers/constants.h" #include "shared/source/helpers/heap_helper.h" -#include "shared/source/helpers/non_copyable_or_moveable.h" #include #include @@ -37,6 +36,10 @@ class BindlessHeapsHelper { }; BindlessHeapsHelper(MemoryManager *memManager, bool isMultiOsContextCapable, const uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield); ~BindlessHeapsHelper(); + + BindlessHeapsHelper(const BindlessHeapsHelper &) = delete; + BindlessHeapsHelper &operator=(const BindlessHeapsHelper &) = delete; + GraphicsAllocation *getHeapAllocation(size_t heapSize, size_t alignment, bool allocInFrontWindow); SurfaceStateInHeapInfo allocateSSInHeap(size_t ssSize, GraphicsAllocation *surfaceAllocation, BindlesHeapType heapType); @@ -60,4 +63,4 @@ class BindlessHeapsHelper { std::mutex mtx; DeviceBitfield deviceBitfield; }; -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/helpers/common_types.h b/shared/source/helpers/common_types.h index 77117fc057..423cfc73bc 100644 --- a/shared/source/helpers/common_types.h +++ b/shared/source/helpers/common_types.h @@ -7,8 +7,10 @@ #pragma once #include +#include #include #include + namespace NEO { struct EngineControl; using EngineControlContainer = std::vector; diff --git a/shared/source/helpers/completion_stamp.h b/shared/source/helpers/completion_stamp.h index 57a14c27b2..57a2ff8bbf 100644 --- a/shared/source/helpers/completion_stamp.h +++ b/shared/source/helpers/completion_stamp.h @@ -10,7 +10,7 @@ #include namespace NEO { -typedef uint64_t FlushStamp; +using FlushStamp = uint64_t; struct CompletionStamp { uint32_t taskCount; uint32_t taskLevel; diff --git a/shared/source/helpers/deferred_deleter_helper.h b/shared/source/helpers/deferred_deleter_helper.h index 35977dd630..a5e8fd3304 100644 --- a/shared/source/helpers/deferred_deleter_helper.h +++ b/shared/source/helpers/deferred_deleter_helper.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + namespace NEO { bool isDeferredDeleterEnabled(); } // namespace NEO diff --git a/shared/source/helpers/engine_node_helper.cpp b/shared/source/helpers/engine_node_helper.cpp index 19a417e43b..8778bde9dd 100644 --- a/shared/source/helpers/engine_node_helper.cpp +++ b/shared/source/helpers/engine_node_helper.cpp @@ -7,6 +7,7 @@ #include "shared/source/helpers/engine_node_helper.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/device/device.h" #include "shared/source/helpers/hw_helper.h" diff --git a/shared/source/helpers/hash.h b/shared/source/helpers/hash.h index 909931f1fb..f87392e0c0 100644 --- a/shared/source/helpers/hash.h +++ b/shared/source/helpers/hash.h @@ -1,13 +1,12 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/aligned_memory.h" - +#include #include namespace NEO { diff --git a/shared/source/helpers/heap_assigner.h b/shared/source/helpers/heap_assigner.h index 3b50892df5..73d8e23e2c 100644 --- a/shared/source/helpers/heap_assigner.h +++ b/shared/source/helpers/heap_assigner.h @@ -6,10 +6,14 @@ */ #pragma once -#include "shared/source/memory_manager/graphics_allocation.h" +#include "shared/source/memory_manager/allocation_type.h" + +#include namespace NEO { +enum class HeapIndex : uint32_t; struct HardwareInfo; + struct HeapAssigner { HeapAssigner(); ~HeapAssigner() = default; @@ -24,4 +28,4 @@ struct HeapAssigner { static HeapIndex mapInternalWindowIndex(HeapIndex index); bool apiAllowExternalHeapForSshAndDsh = false; }; -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/helpers/kernel_helpers.h b/shared/source/helpers/kernel_helpers.h index 7c9e3c8e57..e97f48076d 100644 --- a/shared/source/helpers/kernel_helpers.h +++ b/shared/source/helpers/kernel_helpers.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include #include diff --git a/shared/source/helpers/memory_properties_helpers_base.inl b/shared/source/helpers/memory_properties_helpers_base.inl index 5595c488b0..874b62fee0 100644 --- a/shared/source/helpers/memory_properties_helpers_base.inl +++ b/shared/source/helpers/memory_properties_helpers_base.inl @@ -5,6 +5,7 @@ * */ +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/bit_helpers.h" #include "shared/source/helpers/memory_properties_helpers.h" diff --git a/shared/source/indirect_heap/indirect_heap.h b/shared/source/indirect_heap/indirect_heap.h index b2d2eaa15a..c254b1542b 100644 --- a/shared/source/indirect_heap/indirect_heap.h +++ b/shared/source/indirect_heap/indirect_heap.h @@ -8,16 +8,12 @@ #pragma once #include "shared/source/command_stream/linear_stream.h" #include "shared/source/helpers/aligned_memory.h" -#include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/constants.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/indirect_heap/indirect_heap_type.h" #include "shared/source/memory_manager/graphics_allocation.h" namespace NEO { -class GraphicsAllocation; - -using HeapContainer = std::vector; constexpr size_t defaultHeapSize = 64 * KB; @@ -30,7 +26,7 @@ inline size_t getDefaultHeapSize() { } class IndirectHeap : public LinearStream { - typedef LinearStream BaseClass; + using BaseClass = LinearStream; public: using Type = IndirectHeapType; diff --git a/shared/source/kernel/kernel_descriptor.h b/shared/source/kernel/kernel_descriptor.h index 28e927ad0c..09ea804c74 100644 --- a/shared/source/kernel/kernel_descriptor.h +++ b/shared/source/kernel/kernel_descriptor.h @@ -13,7 +13,6 @@ #include "shared/source/kernel/debug_data.h" #include "shared/source/kernel/kernel_arg_descriptor.h" #include "shared/source/kernel/kernel_arg_metadata.h" -#include "shared/source/utilities/arrayref.h" #include "shared/source/utilities/stackvec.h" #include diff --git a/shared/source/memory_manager/local_memory_usage.cpp b/shared/source/memory_manager/local_memory_usage.cpp index c5c595588b..5abfc6f489 100644 --- a/shared/source/memory_manager/local_memory_usage.cpp +++ b/shared/source/memory_manager/local_memory_usage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,6 +13,7 @@ #include #include #include +#include namespace NEO { diff --git a/shared/source/os_interface/hw_info_config.h b/shared/source/os_interface/hw_info_config.h index acee1766f7..e06e702080 100644 --- a/shared/source/os_interface/hw_info_config.h +++ b/shared/source/os_interface/hw_info_config.h @@ -7,6 +7,7 @@ #pragma once +#include "shared/source/helpers/common_types.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/helpers/local_memory_access_modes.h" #include "shared/source/unified_memory/usm_memory_support.h" @@ -21,6 +22,7 @@ struct StateComputeModeProperties; struct PipelineSelectArgs; class OSInterface; class HwInfoConfig; +class GraphicsAllocation; enum class DriverModelType; extern HwInfoConfig *hwInfoConfigFactory[IGFX_MAX_PRODUCT]; diff --git a/shared/source/os_interface/hw_info_config.inl b/shared/source/os_interface/hw_info_config.inl index b97c37253d..5f9a4a7447 100644 --- a/shared/source/os_interface/hw_info_config.inl +++ b/shared/source/os_interface/hw_info_config.inl @@ -7,6 +7,7 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/api_specific_config.h" +#include "shared/source/helpers/constants.h" #include "shared/source/helpers/driver_model_type.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/helpers/preamble.h" diff --git a/shared/source/os_interface/linux/drm_debug.cpp b/shared/source/os_interface/linux/drm_debug.cpp index 2476e7cb8a..8f75e8f538 100644 --- a/shared/source/os_interface/linux/drm_debug.cpp +++ b/shared/source/os_interface/linux/drm_debug.cpp @@ -7,6 +7,7 @@ #include "shared/source/os_interface/linux/drm_debug.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/string.h" #include "shared/source/os_interface/linux/drm_neo.h" diff --git a/shared/source/os_interface/linux/drm_neo.h b/shared/source/os_interface/linux/drm_neo.h index 5534773df6..233d0a0bf5 100644 --- a/shared/source/os_interface/linux/drm_neo.h +++ b/shared/source/os_interface/linux/drm_neo.h @@ -8,6 +8,7 @@ #pragma once #include "shared/source/gmm_helper/gmm_lib.h" #include "shared/source/helpers/basic_math.h" +#include "shared/source/helpers/common_types.h" #include "shared/source/helpers/topology_map.h" #include "shared/source/memory_manager/definitions/engine_limits.h" #include "shared/source/os_interface/driver_info.h" diff --git a/shared/source/os_interface/linux/ioctl_helper.cpp b/shared/source/os_interface/linux/ioctl_helper.cpp index 04b3c97507..3157b71828 100644 --- a/shared/source/os_interface/linux/ioctl_helper.cpp +++ b/shared/source/os_interface/linux/ioctl_helper.cpp @@ -7,12 +7,15 @@ #include "shared/source/os_interface/linux/ioctl_helper.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/os_interface/linux/drm_neo.h" #include "shared/source/os_interface/linux/drm_wrappers.h" #include "drm/i915_drm.h" +#include + namespace NEO { uint32_t IoctlHelper::ioctl(Drm *drm, unsigned long request, void *arg) { diff --git a/shared/source/os_interface/linux/ioctl_strings.h b/shared/source/os_interface/linux/ioctl_strings.h index 16b58e71ca..4e5ba98a3a 100644 --- a/shared/source/os_interface/linux/ioctl_strings.h +++ b/shared/source/os_interface/linux/ioctl_strings.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include namespace NEO { diff --git a/shared/source/os_interface/linux/memory_info.cpp b/shared/source/os_interface/linux/memory_info.cpp index 3df41827d3..752dc73d69 100644 --- a/shared/source/os_interface/linux/memory_info.cpp +++ b/shared/source/os_interface/linux/memory_info.cpp @@ -7,12 +7,15 @@ #include "shared/source/os_interface/linux/memory_info.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/execution_environment/root_device_environment.h" #include "shared/source/helpers/basic_math.h" #include "shared/source/helpers/debug_helpers.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/os_interface/linux/drm_neo.h" +#include + namespace NEO { MemoryInfo::MemoryInfo(const RegionContainer ®ionInfo) diff --git a/shared/source/os_interface/linux/os_memory_linux.h b/shared/source/os_interface/linux/os_memory_linux.h index b87121e975..54cfc321a8 100644 --- a/shared/source/os_interface/linux/os_memory_linux.h +++ b/shared/source/os_interface/linux/os_memory_linux.h @@ -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/os_interface/os_memory.h" #include diff --git a/shared/source/os_interface/linux/os_thread_linux.h b/shared/source/os_interface/linux/os_thread_linux.h index e347ef2517..2b11b8ab01 100644 --- a/shared/source/os_interface/linux/os_thread_linux.h +++ b/shared/source/os_interface/linux/os_thread_linux.h @@ -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/os_thread.h" #include diff --git a/shared/source/os_interface/linux/pmt_util.h b/shared/source/os_interface/linux/pmt_util.h index 659e048149..28ecad3f05 100644 --- a/shared/source/os_interface/linux/pmt_util.h +++ b/shared/source/os_interface/linux/pmt_util.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include #include #include @@ -21,4 +23,4 @@ class PmtUtil { static ssize_t readTelem(std::string_view telemDir, const std::size_t size, const uint64_t offset, void *data); }; -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/source/os_interface/windows/os_memory_win.h b/shared/source/os_interface/windows/os_memory_win.h index 1bd3a3f3c9..dbf0ed63a6 100644 --- a/shared/source/os_interface/windows/os_memory_win.h +++ b/shared/source/os_interface/windows/os_memory_win.h @@ -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/os_interface/os_memory.h" #include diff --git a/shared/source/os_interface/windows/os_thread_win.h b/shared/source/os_interface/windows/os_thread_win.h index 97efda1e45..ce6e4483ac 100644 --- a/shared/source/os_interface/windows/os_thread_win.h +++ b/shared/source/os_interface/windows/os_thread_win.h @@ -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/os_thread.h" #include diff --git a/shared/source/page_fault_manager/cpu_page_fault_manager.cpp b/shared/source/page_fault_manager/cpu_page_fault_manager.cpp index eb403b4dd5..e5a31a454a 100644 --- a/shared/source/page_fault_manager/cpu_page_fault_manager.cpp +++ b/shared/source/page_fault_manager/cpu_page_fault_manager.cpp @@ -7,11 +7,12 @@ #include "shared/source/page_fault_manager/cpu_page_fault_manager.h" +#include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/memory_properties_helpers.h" #include "shared/source/memory_manager/unified_memory_manager.h" +#include "shared/source/utilities/spinlock.h" #include -#include namespace NEO { void PageFaultManager::insertAllocation(void *ptr, size_t size, SVMAllocsManager *unifiedMemoryManager, void *cmdQ, const MemoryProperties &memoryProperties) { diff --git a/shared/source/program/kernel_info.h b/shared/source/program/kernel_info.h index ef85d022cc..7a912ea85e 100644 --- a/shared/source/program/kernel_info.h +++ b/shared/source/program/kernel_info.h @@ -11,14 +11,12 @@ #include "shared/source/program/heap_info.h" #include "shared/source/utilities/arrayref.h" #include "shared/source/utilities/const_stringref.h" +#include "shared/source/utilities/stackvec.h" -#include -#include #include #include -#include #include -#include +#include #include namespace gtpin { diff --git a/shared/source/program/print_formatter.h b/shared/source/program/print_formatter.h index 4978f8f7fa..f2da586765 100644 --- a/shared/source/program/print_formatter.h +++ b/shared/source/program/print_formatter.h @@ -11,10 +11,10 @@ #include "shared/source/helpers/constants.h" #include "shared/source/os_interface/print.h" -#include #include #include #include +#include #include #include diff --git a/shared/source/source_level_debugger/source_level_debugger.cpp b/shared/source/source_level_debugger/source_level_debugger.cpp index 48baf13a90..12af6f29f6 100644 --- a/shared/source/source_level_debugger/source_level_debugger.cpp +++ b/shared/source/source_level_debugger/source_level_debugger.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,6 +17,8 @@ #include "igfx_debug_interchange_types.h" #include "lib_names.h" +#include + #define IGFXDBG_CURRENT_VERSION 4 namespace NEO { diff --git a/shared/source/utilities/arrayref.h b/shared/source/utilities/arrayref.h index df20db707c..1955babeb1 100644 --- a/shared/source/utilities/arrayref.h +++ b/shared/source/utilities/arrayref.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,7 +8,6 @@ #pragma once #include -#include #include template diff --git a/shared/source/utilities/debug_file_reader.cpp b/shared/source/utilities/debug_file_reader.cpp index 8fe013ad18..b4e06cb90f 100644 --- a/shared/source/utilities/debug_file_reader.cpp +++ b/shared/source/utilities/debug_file_reader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,9 @@ #include "shared/source/utilities/debug_file_reader.h" +#include +#include + namespace NEO { SettingsFileReader::SettingsFileReader(const char *filePath) { diff --git a/shared/source/utilities/debug_file_reader.h b/shared/source/utilities/debug_file_reader.h index 9eaa92193e..e6cec71471 100644 --- a/shared/source/utilities/debug_file_reader.h +++ b/shared/source/utilities/debug_file_reader.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,9 +9,9 @@ #include "shared/source/utilities/debug_settings_reader.h" +#include +#include #include -#include -#include #include namespace NEO { diff --git a/shared/source/utilities/debug_settings_reader.cpp b/shared/source/utilities/debug_settings_reader.cpp index aa83c5e9e4..493f4d3fff 100644 --- a/shared/source/utilities/debug_settings_reader.cpp +++ b/shared/source/utilities/debug_settings_reader.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,6 +9,8 @@ #include "shared/source/utilities/debug_file_reader.h" +#include + namespace NEO { const char *SettingsReader::settingsFileName = "igdrcl.config"; diff --git a/shared/source/utilities/debug_settings_reader.h b/shared/source/utilities/debug_settings_reader.h index 70d25392b7..482ed1d665 100644 --- a/shared/source/utilities/debug_settings_reader.h +++ b/shared/source/utilities/debug_settings_reader.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include #include #include @@ -14,7 +13,7 @@ namespace NEO { class SettingsReader { public: - virtual ~SettingsReader() {} + virtual ~SettingsReader() = default; static SettingsReader *create(const std::string ®Key) { SettingsReader *readerImpl = createFileReader(); if (readerImpl != nullptr) diff --git a/shared/source/utilities/debug_settings_reader_creator.h b/shared/source/utilities/debug_settings_reader_creator.h index f10debade0..46ba8eb3f0 100644 --- a/shared/source/utilities/debug_settings_reader_creator.h +++ b/shared/source/utilities/debug_settings_reader_creator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -10,6 +10,7 @@ #include "shared/source/utilities/debug_settings_reader.h" #include +#include namespace NEO { class SettingsReaderCreator { diff --git a/shared/source/utilities/heap_allocator.h b/shared/source/utilities/heap_allocator.h index 7d7496d041..fda84d3b79 100644 --- a/shared/source/utilities/heap_allocator.h +++ b/shared/source/utilities/heap_allocator.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -11,7 +11,6 @@ #include #include -#include #include namespace NEO { diff --git a/shared/source/utilities/logger.h b/shared/source/utilities/logger.h index 7d6a303bd6..58820e01f4 100644 --- a/shared/source/utilities/logger.h +++ b/shared/source/utilities/logger.h @@ -15,6 +15,7 @@ #include #include #include +#include namespace NEO { class Kernel; diff --git a/shared/source/utilities/lookup_array.h b/shared/source/utilities/lookup_array.h index ee99887065..42c8af18a5 100644 --- a/shared/source/utilities/lookup_array.h +++ b/shared/source/utilities/lookup_array.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/helpers/debug_helpers.h" #include @@ -26,4 +28,4 @@ struct LookupArray { protected: LookupMapArrayT lookupArray; -}; \ No newline at end of file +}; diff --git a/shared/source/utilities/software_tags.cpp b/shared/source/utilities/software_tags.cpp index 83c4e49d9a..0ab11d7ab9 100644 --- a/shared/source/utilities/software_tags.cpp +++ b/shared/source/utilities/software_tags.cpp @@ -10,6 +10,8 @@ #include "shared/source/debug_settings/debug_settings_manager.h" #include "shared/source/helpers/file_io.h" +#include + namespace NEO { namespace SWTags { diff --git a/shared/source/utilities/software_tags.h b/shared/source/utilities/software_tags.h index 23eafb89cb..ff71f94bb5 100644 --- a/shared/source/utilities/software_tags.h +++ b/shared/source/utilities/software_tags.h @@ -8,7 +8,7 @@ #pragma once #include "shared/source/helpers/string.h" -#include +#include #include namespace NEO { diff --git a/shared/source/utilities/timer_util.h b/shared/source/utilities/timer_util.h index 51ee49df3f..7eb04ee6cf 100644 --- a/shared/source/utilities/timer_util.h +++ b/shared/source/utilities/timer_util.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include namespace NEO { diff --git a/shared/source/xe_hpc_core/hw_cmds_pvc.h b/shared/source/xe_hpc_core/hw_cmds_pvc.h index 32e373b0eb..2d60ed0b3e 100644 --- a/shared/source/xe_hpc_core/hw_cmds_pvc.h +++ b/shared/source/xe_hpc_core/hw_cmds_pvc.h @@ -10,6 +10,8 @@ #include "device_ids_configs_pvc.h" +#include + namespace NEO { struct PVC : public XE_HPC_COREFamily { diff --git a/shared/source/xe_hpg_core/hw_cmds_dg2.h b/shared/source/xe_hpg_core/hw_cmds_dg2.h index c2b4fab884..0bf65059f8 100644 --- a/shared/source/xe_hpg_core/hw_cmds_dg2.h +++ b/shared/source/xe_hpg_core/hw_cmds_dg2.h @@ -10,6 +10,8 @@ #include "device_ids_configs_dg2.h" +#include + namespace NEO { struct DG2 : public XE_HPG_COREFamily { diff --git a/shared/test/common/fixtures/direct_submission_fixture.h b/shared/test/common/fixtures/direct_submission_fixture.h index 0235e772ed..6309012b39 100644 --- a/shared/test/common/fixtures/direct_submission_fixture.h +++ b/shared/test/common/fixtures/direct_submission_fixture.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/os_interface/device_factory.h" #include "shared/source/os_interface/os_context.h" #include "shared/test/common/fixtures/device_fixture.h" diff --git a/shared/test/common/fixtures/front_window_fixture.h b/shared/test/common/fixtures/front_window_fixture.h index c5aa15a4aa..c1a9d222d6 100644 --- a/shared/test/common/fixtures/front_window_fixture.h +++ b/shared/test/common/fixtures/front_window_fixture.h @@ -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/fixtures/device_fixture.h" #include "shared/test/common/mocks/mock_memory_manager.h" #include "shared/test/common/test_macros/test.h" @@ -23,4 +25,4 @@ class MemManagerFixture : public DeviceFixture { std::unique_ptr memManager; }; -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/test/common/fixtures/gmm_callbacks_fixture.h b/shared/test/common/fixtures/gmm_callbacks_fixture.h index 70f38f3e86..4f689cf194 100644 --- a/shared/test/common/fixtures/gmm_callbacks_fixture.h +++ b/shared/test/common/fixtures/gmm_callbacks_fixture.h @@ -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/execution_environment.h" #include "shared/test/common/helpers/execution_environment_helper.h" diff --git a/shared/test/common/helpers/memory_management.h b/shared/test/common/helpers/memory_management.h index 4366181295..7771f71baa 100644 --- a/shared/test/common/helpers/memory_management.h +++ b/shared/test/common/helpers/memory_management.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -50,10 +50,10 @@ struct AllocationEvent { // NOLINT(clang-analyzer-optin.performance.Padding) void *callstack[CallStackSize]; bool fastLeakDetectionEnabled = false; }; -enum : int { - maxEvents = 1024 * 1024, - fastEvents = 1024 * 1024 -}; + +constexpr auto maxEvents = 1024 * 1024; +constexpr auto fastEvents = 1024 * 1024; + extern AllocationEvent eventsAllocated[maxEvents]; extern AllocationEvent eventsDeallocated[maxEvents]; diff --git a/shared/test/common/helpers/state_base_address_tests.h b/shared/test/common/helpers/state_base_address_tests.h index 98a7175781..ade8d1c462 100644 --- a/shared/test/common/helpers/state_base_address_tests.h +++ b/shared/test/common/helpers/state_base_address_tests.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include "shared/source/command_stream/linear_stream.h" #include "shared/source/helpers/state_base_address.h" #include "shared/source/indirect_heap/indirect_heap.h" diff --git a/shared/test/common/libult/linux/drm_mock_prelim_context.cpp b/shared/test/common/libult/linux/drm_mock_prelim_context.cpp index 3106ed0e4a..9ec7f46730 100644 --- a/shared/test/common/libult/linux/drm_mock_prelim_context.cpp +++ b/shared/test/common/libult/linux/drm_mock_prelim_context.cpp @@ -8,6 +8,7 @@ #include "shared/test/common/libult/linux/drm_mock_prelim_context.h" #include "shared/source/helpers/basic_math.h" +#include "shared/source/helpers/constants.h" #include "shared/source/helpers/ptr_math.h" #include "shared/source/helpers/string.h" #include "shared/source/os_interface/linux/cache_info.h" diff --git a/shared/test/common/libult/source_level_debugger_library.h b/shared/test/common/libult/source_level_debugger_library.h index 294d47a523..7ca668c7ff 100644 --- a/shared/test/common/libult/source_level_debugger_library.h +++ b/shared/test/common/libult/source_level_debugger_library.h @@ -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/os_interface/os_library.h" #include "igfx_debug_interchange_types.h" diff --git a/shared/test/common/mocks/mock_bindless_heaps_helper.h b/shared/test/common/mocks/mock_bindless_heaps_helper.h index 732b7ddaed..7bbc58ac1d 100644 --- a/shared/test/common/mocks/mock_bindless_heaps_helper.h +++ b/shared/test/common/mocks/mock_bindless_heaps_helper.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include "shared/source/helpers/bindless_heaps_helper.h" using namespace NEO; diff --git a/shared/test/common/mocks/mock_gfx_partition.h b/shared/test/common/mocks/mock_gfx_partition.h index 1a01aa2d86..f307b2a7f7 100644 --- a/shared/test/common/mocks/mock_gfx_partition.h +++ b/shared/test/common/mocks/mock_gfx_partition.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/memory_manager/gfx_partition.h" #include "gtest/gtest.h" diff --git a/shared/test/common/mocks/mock_kernel_info.h b/shared/test/common/mocks/mock_kernel_info.h index 88ade99801..276e6719f0 100644 --- a/shared/test/common/mocks/mock_kernel_info.h +++ b/shared/test/common/mocks/mock_kernel_info.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/kernel/kernel_arg_descriptor_extended_device_side_enqueue.h" #include "shared/source/kernel/kernel_arg_descriptor_extended_vme.h" #include "shared/source/program/kernel_info.h" @@ -13,6 +15,7 @@ #include "patch_list.h" #include + namespace NEO { class MockKernelInfo : public KernelInfo { diff --git a/shared/test/common/os_interface/linux/sys_calls_linux_ult.h b/shared/test/common/os_interface/linux/sys_calls_linux_ult.h index 7531733142..65d111eddc 100644 --- a/shared/test/common/os_interface/linux/sys_calls_linux_ult.h +++ b/shared/test/common/os_interface/linux/sys_calls_linux_ult.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include #include diff --git a/shared/test/common/os_interface/windows/mock_environment_variables.h b/shared/test/common/os_interface/windows/mock_environment_variables.h index 3c65e0226e..49c204bf69 100644 --- a/shared/test/common/os_interface/windows/mock_environment_variables.h +++ b/shared/test/common/os_interface/windows/mock_environment_variables.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include extern uint32_t (*getEnvironmentVariableMock)(const char *name, char *outBuffer, uint32_t outBufferSize); diff --git a/shared/test/unit_test/direct_submission/dispatchers/dispatcher_fixture.h b/shared/test/unit_test/direct_submission/dispatchers/dispatcher_fixture.h index decece21b5..e6b8bcd1bd 100644 --- a/shared/test/unit_test/direct_submission/dispatchers/dispatcher_fixture.h +++ b/shared/test/unit_test/direct_submission/dispatchers/dispatcher_fixture.h @@ -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/command_stream/linear_stream.h" #include "shared/test/common/fixtures/device_fixture.h" diff --git a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h index 70810db9da..2f7b1190d0 100644 --- a/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h +++ b/shared/test/unit_test/encoders/test_encode_dispatch_kernel_dg2_and_later.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/command_container/command_encoder.h" #include "shared/source/helpers/hw_info.h" #include "shared/source/kernel/dispatch_kernel_encoder_interface.h" diff --git a/shared/test/unit_test/encoders/walker_partition_fixture_xehp_and_later.h b/shared/test/unit_test/encoders/walker_partition_fixture_xehp_and_later.h index c6238f718f..4c42d457b5 100644 --- a/shared/test/unit_test/encoders/walker_partition_fixture_xehp_and_later.h +++ b/shared/test/unit_test/encoders/walker_partition_fixture_xehp_and_later.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include "shared/source/command_container/walker_partition_xehp_and_later.h" #include "shared/source/helpers/hw_info.h" #include "shared/test/common/cmd_parse/gen_cmd_parse.h" diff --git a/shared/test/unit_test/image/image_surface_state_fixture.h b/shared/test/unit_test/image/image_surface_state_fixture.h index a45e4c4812..6b8a9b7271 100644 --- a/shared/test/unit_test/image/image_surface_state_fixture.h +++ b/shared/test/unit_test/image/image_surface_state_fixture.h @@ -5,6 +5,8 @@ * */ +#pragma once + #include "shared/source/gmm_helper/gmm.h" #include "shared/source/gmm_helper/gmm_helper.h" #include "shared/source/helpers/aligned_memory.h" diff --git a/shared/test/unit_test/os_interface/windows/adapter_info_tests.h b/shared/test/unit_test/os_interface/windows/adapter_info_tests.h index 6f1c54984c..76ec741d50 100644 --- a/shared/test/unit_test/os_interface/windows/adapter_info_tests.h +++ b/shared/test/unit_test/os_interface/windows/adapter_info_tests.h @@ -1,10 +1,12 @@ /* - * Copyright (C) 2021 Intel Corporation + * Copyright (C) 2021-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ +#pragma once + #include "shared/source/os_interface/windows/gdi_interface.h" #include "shared/source/os_interface/windows/wddm/adapter_info.h" diff --git a/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp b/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp index 02e6a17ffe..024bf398ad 100644 --- a/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp +++ b/shared/test/unit_test/xe_hpc_core/pvc/hw_info_tests_pvc.cpp @@ -5,6 +5,7 @@ * */ +#include "shared/source/helpers/constants.h" #include "shared/source/helpers/hw_info.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" diff --git a/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp b/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp index c24dd56804..5930aa7428 100644 --- a/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp +++ b/shared/test/unit_test/xe_hpg_core/dg2/hw_info_config_tests_dg2.cpp @@ -6,12 +6,14 @@ */ #include "shared/source/command_stream/stream_properties.h" +#include "shared/source/helpers/constants.h" #include "shared/source/helpers/hw_helper.h" #include "shared/source/os_interface/hw_info_config.h" #include "shared/test/common/fixtures/product_config_fixture.h" #include "shared/test/common/helpers/debug_manager_state_restore.h" #include "shared/test/common/helpers/default_hw_info.h" #include "shared/test/common/test_macros/test.h" + using namespace NEO; using HwInfoConfigTestDg2 = ::testing::Test; @@ -447,4 +449,4 @@ DG2TEST_F(ProductConfigTests, givenDg2G11DeviceIdWhenDifferentRevisionIsPassedTh productConfig = hwInfoConfig->getProductConfigFromHwInfo(hwInfo); EXPECT_EQ(productConfig, DG2_G11); } -} \ No newline at end of file +}