From 9a8125cdb0f7ec8be69437fcf901646e387961a9 Mon Sep 17 00:00:00 2001 From: Filip Hazubski Date: Mon, 15 Mar 2021 11:39:58 +0000 Subject: [PATCH] Correct formatting Signed-off-by: Filip Hazubski --- level_zero/experimental/source/tracing/tracing_imp.h | 4 ++-- .../sources/tracing/test_api_tracing_common.h | 4 ++-- opencl/source/built_ins/populate_built_ins.inl | 4 ++-- opencl/source/context/context.h | 6 +++--- opencl/source/event/event_builder.h | 4 ++-- opencl/source/helpers/base_object.h | 4 ++-- opencl/source/utilities/logger.h | 4 ++-- .../command_queue/enqueue_copy_buffer_rect_tests.cpp | 8 +++++--- .../command_queue/enqueue_copy_buffer_tests.cpp | 5 +++-- .../command_queue/enqueue_copy_image_tests.cpp | 3 ++- .../enqueue_copy_image_to_buffer_tests.cpp | 3 ++- .../command_queue/enqueue_fill_image_tests.cpp | 5 +++-- .../command_queue/enqueue_read_buffer_rect_tests.cpp | 5 +++-- .../enqueue_write_buffer_rect_tests.cpp | 5 +++-- opencl/test/unit_test/mocks/mock_cif.cpp | 4 ++-- opencl/test/unit_test/mocks/mock_event.h | 12 ++++++------ .../compiler_options/compiler_options_base.h | 6 +++--- .../source/debug_settings/debug_settings_manager.h | 2 +- shared/source/device/device.h | 2 +- .../device_binary_format/patchtokens_decoder.cpp | 6 +++--- shared/source/helpers/local_id_gen.h | 12 ++++++------ shared/source/helpers/registered_method_dispatcher.h | 6 +++--- shared/source/utilities/time_measure_wrapper.h | 4 ++-- .../test/unit_test/compiler_interface/linker_mock.h | 4 ++-- shared/test/unit_test/utilities/base_object_utils.h | 4 ++-- .../unit_test/utilities/containers_tests_helpers.h | 12 ++++++------ shared/test/unit_test/utilities/destructor_counted.h | 6 +++--- 27 files changed, 76 insertions(+), 68 deletions(-) diff --git a/level_zero/experimental/source/tracing/tracing_imp.h b/level_zero/experimental/source/tracing/tracing_imp.h index 5ffcac7fc6..d7f571fa63 100644 --- a/level_zero/experimental/source/tracing/tracing_imp.h +++ b/level_zero/experimental/source/tracing/tracing_imp.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -191,7 +191,7 @@ ze_result_t APITracerWrapperImp(TFunction_pointer zeApiPtr, TTracer apiOrdinal, TTracerPrologCallbacks prologCallbacks, TTracerEpilogCallbacks epilogCallbacks, - Args &&... args) { + Args &&...args) { ze_result_t ret = ZE_RESULT_SUCCESS; std::vector> *callbacks_prologs = &prologCallbacks; diff --git a/level_zero/experimental/test/unit_tests/sources/tracing/test_api_tracing_common.h b/level_zero/experimental/test/unit_tests/sources/tracing/test_api_tracing_common.h index a75429d807..05ab971585 100644 --- a/level_zero/experimental/test/unit_tests/sources/tracing/test_api_tracing_common.h +++ b/level_zero/experimental/test/unit_tests/sources/tracing/test_api_tracing_common.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Intel Corporation + * Copyright (C) 2020-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -34,7 +34,7 @@ extern struct APITracerContextImp *pGlobalAPITracerContextImp; namespace ult { template -ze_result_t callHandleTracerRecursion(TFunctionPointer zeApiPtr, Args &&... args) { +ze_result_t callHandleTracerRecursion(TFunctionPointer zeApiPtr, Args &&...args) { ZE_HANDLE_TRACER_RECURSION(zeApiPtr, args...); return ZE_RESULT_ERROR_UNKNOWN; } diff --git a/opencl/source/built_ins/populate_built_ins.inl b/opencl/source/built_ins/populate_built_ins.inl index c1678a75be..67b740a050 100644 --- a/opencl/source/built_ins/populate_built_ins.inl +++ b/opencl/source/built_ins/populate_built_ins.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -9,7 +9,7 @@ namespace NEO { template -void BuiltinDispatchInfoBuilder::populate(EBuiltInOps::Type op, ConstStringRef options, KernelsDescArgsT &&... desc) { +void BuiltinDispatchInfoBuilder::populate(EBuiltInOps::Type op, ConstStringRef options, KernelsDescArgsT &&...desc) { auto src = kernelsLib.getBuiltinsLib().getBuiltinCode(op, BuiltinCode::ECodeType::Any, clDevice.getDevice()); ClDeviceVector deviceVector; deviceVector.push_back(&clDevice); diff --git a/opencl/source/context/context.h b/opencl/source/context/context.h index 3df758b822..453a93938d 100644 --- a/opencl/source/context/context.h +++ b/opencl/source/context/context.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -109,7 +109,7 @@ class Context : public BaseObject<_cl_context> { void registerSharing(Sharing *sharing); template - void providePerformanceHint(cl_diagnostics_verbose_level flags, PerformanceHints performanceHint, Args &&... args) { + void providePerformanceHint(cl_diagnostics_verbose_level flags, PerformanceHints performanceHint, Args &&...args) { DEBUG_BREAK_IF(contextCallback == nullptr); DEBUG_BREAK_IF(driverDiagnostics == nullptr); char hint[DriverDiagnostics::maxHintStringSize]; @@ -125,7 +125,7 @@ class Context : public BaseObject<_cl_context> { } template - void providePerformanceHintForMemoryTransfer(cl_command_type commandType, bool transferRequired, Args &&... args) { + void providePerformanceHintForMemoryTransfer(cl_command_type commandType, bool transferRequired, Args &&...args) { cl_diagnostics_verbose_level verboseLevel = transferRequired ? CL_CONTEXT_DIAGNOSTICS_LEVEL_BAD_INTEL : CL_CONTEXT_DIAGNOSTICS_LEVEL_GOOD_INTEL; PerformanceHints hint = driverDiagnostics->obtainHintForTransferOperation(commandType, transferRequired); diff --git a/opencl/source/event/event_builder.h b/opencl/source/event/event_builder.h index 194f96faca..be894de26b 100644 --- a/opencl/source/event/event_builder.h +++ b/opencl/source/event/event_builder.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,7 +20,7 @@ class Event; class EventBuilder { public: template - void create(ArgsT &&... args) { + void create(ArgsT &&...args) { event = new EventType(std::forward(args)...); } diff --git a/opencl/source/helpers/base_object.h b/opencl/source/helpers/base_object.h index c90e63df39..b24fb90bf2 100644 --- a/opencl/source/helpers/base_object.h +++ b/opencl/source/helpers/base_object.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -78,7 +78,7 @@ class ConditionVariableWithCounter { waitersCount = 0; } template - void wait(Args &&... args) { + void wait(Args &&...args) { ++waitersCount; cond.wait(std::forward(args)...); --waitersCount; diff --git a/opencl/source/utilities/logger.h b/opencl/source/utilities/logger.h index 7266949953..0ecac16377 100644 --- a/opencl/source/utilities/logger.h +++ b/opencl/source/utilities/logger.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -93,7 +93,7 @@ class FileLogger { // Expects pairs of args (even number of args) template - void logInputs(Types &&... params) { + void logInputs(Types &&...params) { if (enabled()) { if (logApiCalls) { std::unique_lock theLock(mtx); diff --git a/opencl/test/unit_test/command_queue/enqueue_copy_buffer_rect_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_copy_buffer_rect_tests.cpp index c32ae4b3ad..02ca9b4a2e 100644 --- a/opencl/test/unit_test/command_queue/enqueue_copy_buffer_rect_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_copy_buffer_rect_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -125,7 +125,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyBufferRectTest, WhenCopyingBufferRect2DTh // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks @@ -306,7 +307,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyBufferRectTest, WhenCopyingBufferRect3DTh // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp index 0ff18a9732..a9d02fd282 100644 --- a/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_copy_buffer_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -152,7 +152,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyBufferTest, WhenCopyingBufferThenGpgpuWal // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/command_queue/enqueue_copy_image_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_copy_image_tests.cpp index a1a8dc7b42..3670c3b4c2 100644 --- a/opencl/test/unit_test/command_queue/enqueue_copy_image_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_copy_image_tests.cpp @@ -40,7 +40,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyImageTest, WhenCopyingImageThenGpgpuWalke // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/command_queue/enqueue_copy_image_to_buffer_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_copy_image_to_buffer_tests.cpp index d1299dfd3c..2968bc11f8 100644 --- a/opencl/test/unit_test/command_queue/enqueue_copy_image_to_buffer_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_copy_image_to_buffer_tests.cpp @@ -42,7 +42,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueCopyImageToBufferTest, WhenCopyingImageToBuff // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/command_queue/enqueue_fill_image_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_fill_image_tests.cpp index 39fa4e06fa..30bdf2fd8a 100644 --- a/opencl/test/unit_test/command_queue/enqueue_fill_image_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_fill_image_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -60,7 +60,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueFillImageTest, WhenFillingImageThenGpgpuWalke // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/command_queue/enqueue_read_buffer_rect_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_read_buffer_rect_tests.cpp index a36502d7f0..2f3fe25b15 100644 --- a/opencl/test/unit_test/command_queue/enqueue_read_buffer_rect_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_read_buffer_rect_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -138,7 +138,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueReadBufferRectTest, Given2dRegionWhenReadingB // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/command_queue/enqueue_write_buffer_rect_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_write_buffer_rect_tests.cpp index 5e12b2bb84..2da32b4d6e 100644 --- a/opencl/test/unit_test/command_queue/enqueue_write_buffer_rect_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_write_buffer_rect_tests.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -113,7 +113,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueWriteBufferRectTest, Given2dRegionWhenWriting // Compute the SIMD lane mask size_t simd = - cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8; + cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 + : 8; uint64_t simdMask = maxNBitValue(simd); // Mask off lanes based on the execution masks diff --git a/opencl/test/unit_test/mocks/mock_cif.cpp b/opencl/test/unit_test/mocks/mock_cif.cpp index b09c7d89b8..12797b898d 100644 --- a/opencl/test/unit_test/mocks/mock_cif.cpp +++ b/opencl/test/unit_test/mocks/mock_cif.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -20,7 +20,7 @@ namespace CIF { namespace Builtins { template -Buffer<0>::Buffer(ArgsT &&... args) { +Buffer<0>::Buffer(ArgsT &&...args) { } Buffer<0>::~Buffer() { diff --git a/opencl/test/unit_test/mocks/mock_event.h b/opencl/test/unit_test/mocks/mock_event.h index 251ef012f1..9b78ebed9f 100644 --- a/opencl/test/unit_test/mocks/mock_event.h +++ b/opencl/test/unit_test/mocks/mock_event.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -12,14 +12,14 @@ namespace NEO { -#define FORWARD_CONSTRUCTOR(THIS_CLASS, BASE_CLASS) \ - template \ - THIS_CLASS(ArgsT &&... args) : BASE_CLASS(std::forward(args)...) { \ +#define FORWARD_CONSTRUCTOR(THIS_CLASS, BASE_CLASS) \ + template \ + THIS_CLASS(ArgsT &&...args) : BASE_CLASS(std::forward(args)...) { \ } #define FORWARD_FUNC(FUNC_NAME, BASE_CLASS) \ template \ - void FUNC_NAME(ArgsT &&... args) { \ + void FUNC_NAME(ArgsT &&...args) { \ BASE_CLASS::FUNC_NAME(std::forward(args)...); \ } @@ -52,7 +52,7 @@ struct MockEventBuilder : EventBuilder { } template - static EventType *createAndFinalize(ArgsT &&... args) { + static EventType *createAndFinalize(ArgsT &&...args) { MockEventBuilder mb; mb.create(std::forward(args)...); return static_cast(mb.finalizeAndRelease()); diff --git a/shared/source/compiler_interface/compiler_options/compiler_options_base.h b/shared/source/compiler_interface/compiler_options/compiler_options_base.h index 143ed58b7d..d4a0146253 100644 --- a/shared/source/compiler_interface/compiler_options/compiler_options_base.h +++ b/shared/source/compiler_interface/compiler_options/compiler_options_base.h @@ -71,7 +71,7 @@ constexpr size_t concatenationLength(const T &t) { } template -constexpr size_t concatenationLength(const T &arg, const RestT &... rest) { +constexpr size_t concatenationLength(const T &arg, const RestT &...rest) { return length(arg) + spaceSeparatorSize + concatenationLength(rest...); } @@ -84,13 +84,13 @@ inline void concatenateAppend(ContainerT &out, T &&arg) { } template -inline void concatenateAppend(ContainerT &out, T &&arg, RestT &&... rest) { +inline void concatenateAppend(ContainerT &out, T &&arg, RestT &&...rest) { concatenateAppend(out, std::forward(arg)); concatenateAppend(out, std::forward(rest)...); } template -inline std::string concatenate(T &&arg, RestT &&... rest) { +inline std::string concatenate(T &&arg, RestT &&...rest) { std::string ret; ret.reserve(nullterminateSize + concatenationLength(arg, rest...)); concatenateAppend(ret, std::forward(arg), std::forward(rest)...); diff --git a/shared/source/debug_settings/debug_settings_manager.h b/shared/source/debug_settings/debug_settings_manager.h index 9062d67cce..7381046e66 100644 --- a/shared/source/debug_settings/debug_settings_manager.h +++ b/shared/source/debug_settings/debug_settings_manager.h @@ -34,7 +34,7 @@ constexpr DebugFunctionalityLevel globalDebugFunctionalityLevel = DebugFunctiona namespace NEO { template -void printDebugString(bool showDebugLogs, Args &&... args) { +void printDebugString(bool showDebugLogs, Args &&...args) { if (showDebugLogs) { fprintf(std::forward(args)...); } diff --git a/shared/source/device/device.h b/shared/source/device/device.h index 8ef0e9c897..d50e09197f 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -31,7 +31,7 @@ class Device : public ReferenceTrackedObject { ~Device() override; template - static DeviceT *create(ArgsT &&... args) { + static DeviceT *create(ArgsT &&...args) { DeviceT *device = new DeviceT(std::forward(args)...); return createDeviceInternals(device); } diff --git a/shared/source/device_binary_format/patchtokens_decoder.cpp b/shared/source/device_binary_format/patchtokens_decoder.cpp index 7bae539499..1822505501 100644 --- a/shared/source/device_binary_format/patchtokens_decoder.cpp +++ b/shared/source/device_binary_format/patchtokens_decoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -33,12 +33,12 @@ struct PatchTokensStreamReader { } template - bool enoughDataLeft(ArgsT &&... args) { + bool enoughDataLeft(ArgsT &&...args) { return false == notEnoughDataLeft(std::forward(args)...); } template - bool enoughDataLeft(ArgsT &&... args) { + bool enoughDataLeft(ArgsT &&...args) { return false == notEnoughDataLeft(std::forward(args)...); } diff --git a/shared/source/helpers/local_id_gen.h b/shared/source/helpers/local_id_gen.h index 2245f3ec56..f0c4626c17 100644 --- a/shared/source/helpers/local_id_gen.h +++ b/shared/source/helpers/local_id_gen.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -26,11 +26,11 @@ inline size_t getThreadsPerWG(uint32_t simd, size_t lws) { // This sequence is meant to avoid an CPU DIV instruction. result >>= simd == 32 ? 5 - : simd == 16 - ? 4 - : simd == 8 - ? 3 - : 0; + : simd == 16 + ? 4 + : simd == 8 + ? 3 + : 0; return result; } diff --git a/shared/source/helpers/registered_method_dispatcher.h b/shared/source/helpers/registered_method_dispatcher.h index 56f880a16a..0e8daf7b93 100644 --- a/shared/source/helpers/registered_method_dispatcher.h +++ b/shared/source/helpers/registered_method_dispatcher.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,14 +27,14 @@ class RegisteredMethodDispatcher { } template - void operator()(Args &&... args) const { + void operator()(Args &&...args) const { if (method) { method(std::forward(args)...); } } template - size_t estimateCommandsSize(Args &&... args) const { + size_t estimateCommandsSize(Args &&...args) const { if (commandsEstimationMethod) { return commandsEstimationMethod(std::forward(args)...); } diff --git a/shared/source/utilities/time_measure_wrapper.h b/shared/source/utilities/time_measure_wrapper.h index edd3e7bace..2a646d099b 100644 --- a/shared/source/utilities/time_measure_wrapper.h +++ b/shared/source/utilities/time_measure_wrapper.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,7 +15,7 @@ namespace NEO { class TimeMeasureWrapper { public: template - static decltype(auto) functionExecution(O &&obj, F &&func, Args &&... args) { + static decltype(auto) functionExecution(O &&obj, F &&func, Args &&...args) { auto start = std::chrono::system_clock::now(); auto retVal = (obj.*func)(std::forward(args)...); auto end = std::chrono::system_clock::now(); diff --git a/shared/test/unit_test/compiler_interface/linker_mock.h b/shared/test/unit_test/compiler_interface/linker_mock.h index 9a24bdf986..441dfdebed 100644 --- a/shared/test/unit_test/compiler_interface/linker_mock.h +++ b/shared/test/unit_test/compiler_interface/linker_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2020 Intel Corporation + * Copyright (C) 2019-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -40,7 +40,7 @@ struct LightMockConfig { }; template -typename ConfigT::MockReturnT invokeMocked(ConfigT &config, ObjT obj, ArgsT &&... args) { +typename ConfigT::MockReturnT invokeMocked(ConfigT &config, ObjT obj, ArgsT &&...args) { config.timesCalled += 1; if (config.overrideFunc) { return config.overrideFunc(obj, std::forward(args)...); diff --git a/shared/test/unit_test/utilities/base_object_utils.h b/shared/test/unit_test/utilities/base_object_utils.h index cb0a67bdad..569abff999 100644 --- a/shared/test/unit_test/utilities/base_object_utils.h +++ b/shared/test/unit_test/utilities/base_object_utils.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -28,7 +28,7 @@ static ReleaseableObjectPtr clUniquePtr(T *object) { } template -inline ReleaseableObjectPtr<_Ty> make_releaseable(_Types &&... args) { +inline ReleaseableObjectPtr<_Ty> make_releaseable(_Types &&...args) { return (ReleaseableObjectPtr<_Ty>(new _Ty(std::forward<_Types>(args)...))); } } // namespace NEO diff --git a/shared/test/unit_test/utilities/containers_tests_helpers.h b/shared/test/unit_test/utilities/containers_tests_helpers.h index a2cdea16af..c710cbed31 100644 --- a/shared/test/unit_test/utilities/containers_tests_helpers.h +++ b/shared/test/unit_test/utilities/containers_tests_helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2017-2020 Intel Corporation + * Copyright (C) 2017-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -15,7 +15,7 @@ size_t countArgs(const Arg1 &arg1) { } template -size_t countArgs(const Arg1 &arg1, const Rest &... rest) { +size_t countArgs(const Arg1 &arg1, const Rest &...rest) { return 1 + countArgs(rest...); } @@ -29,7 +29,7 @@ int verifySequence(const NodeObjectType *base, int nodeNum, const NodeObjectType } template -int verifySequence(const NodeObjectType *base, int nodeNum, const NodeObjectType *current, const Rest *... rest) { +int verifySequence(const NodeObjectType *base, int nodeNum, const NodeObjectType *current, const Rest *...rest) { if (base == nullptr) { return nodeNum - 1; } else if (base == current) { @@ -43,7 +43,7 @@ int verifySequence(const NodeObjectType *base, int nodeNum, const NodeObjectType // Negative return values indicates that the sequence is ordered as requested. // Non-negative value indicates first node that breaks the order. template -int verifySequence(const NodeObjectType *base, const NodeObjectType *first, const Rest *... rest) { +int verifySequence(const NodeObjectType *base, const NodeObjectType *first, const Rest *...rest) { return verifySequence(base, 0, first, rest...); } @@ -52,7 +52,7 @@ int verifySequence(const NodeObjectType *base, const NodeObjectType *first, cons // Non-negative value indicates first node that breaks the order. // Note : verifies also "last->tail == nulptr" template -int verifyFListOrder(const NodeObjectType *base, const NodeObjectType *first, const Rest *... rest) { +int verifyFListOrder(const NodeObjectType *base, const NodeObjectType *first, const Rest *...rest) { NodeObjectType *sentinel = nullptr; int sequenceRet = verifySequence(base, first, rest..., sentinel); if (sequenceRet < 0) { @@ -72,7 +72,7 @@ int verifyFListOrder(const NodeObjectType *base, const NodeObjectType *first, co // Non-negative value indicates first node that breaks the order. // Note : verifies also "first->prev == nullptr" and "last->tail == nulptr" template -int verifyDListOrder(const NodeObjectType *base, const NodeObjectType *first, const Rest *... rest) { +int verifyDListOrder(const NodeObjectType *base, const NodeObjectType *first, const Rest *...rest) { if (base->prev != nullptr) { return 0; } diff --git a/shared/test/unit_test/utilities/destructor_counted.h b/shared/test/unit_test/utilities/destructor_counted.h index 1986295953..67669d22ca 100644 --- a/shared/test/unit_test/utilities/destructor_counted.h +++ b/shared/test/unit_test/utilities/destructor_counted.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2020 Intel Corporation + * Copyright (C) 2018-2021 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -13,8 +13,8 @@ namespace NEO { template struct DestructorCounted : public BaseType { template - DestructorCounted(uint32_t &destructorId, Args &&... args) : BaseType(std::forward(args)...), - destructorId(destructorId) {} + DestructorCounted(uint32_t &destructorId, Args &&...args) : BaseType(std::forward(args)...), + destructorId(destructorId) {} ~DestructorCounted() override { EXPECT_EQ(ordinal, destructorId);