From 9b347eeb445bee968ecdc07cff997f638dcc9a43 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Fri, 8 Dec 2023 17:28:43 +0100 Subject: [PATCH] Upgrade formatting to clang-format-17 --- .github/workflows/style-check.yml | 2 +- include/xsimd/arch/xsimd_rvv.hpp | 2 +- include/xsimd/arch/xsimd_wasm.hpp | 36 +++++++++---------- include/xsimd/config/xsimd_arch.hpp | 6 ++-- include/xsimd/types/xsimd_all_registers.hpp | 2 +- .../xsimd_avx512vnni_avx512bw_register.hpp | 4 +-- .../xsimd_avx512vnni_avx512vbmi_register.hpp | 4 +-- include/xsimd/types/xsimd_batch_constant.hpp | 4 +-- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/style-check.yml b/.github/workflows/style-check.yml index befbbe97c..81f0e8383 100644 --- a/.github/workflows/style-check.yml +++ b/.github/workflows/style-check.yml @@ -12,7 +12,7 @@ jobs: - name: Run clang-format style check for C/C++ programs. uses: jidicula/clang-format-action@v4.11.0 with: - clang-format-version: '16' + clang-format-version: '17' exclude-regex: 'doctest.h' inlining-check: runs-on: ubuntu-latest diff --git a/include/xsimd/arch/xsimd_rvv.hpp b/include/xsimd/arch/xsimd_rvv.hpp index d524042b5..98d1de9ce 100644 --- a/include/xsimd/arch/xsimd_rvv.hpp +++ b/include/xsimd/arch/xsimd_rvv.hpp @@ -550,7 +550,7 @@ namespace xsimd const auto imag_index = vindex, 1, 1>(); const auto index = rvvabut, A::width>(real_index, imag_index); const auto input = rvvabut(lo.data, hi.data); - const rvv_reg_t result = __riscv_vrgather(input, index, index.vl); + const rvv_reg_t result = __riscv_vrgather(input, index, index.vl); return { rvvget_lo(result), rvvget_hi(result) }; } diff --git a/include/xsimd/arch/xsimd_wasm.hpp b/include/xsimd/arch/xsimd_wasm.hpp index 403f298f6..8160b2423 100644 --- a/include/xsimd/arch/xsimd_wasm.hpp +++ b/include/xsimd/arch/xsimd_wasm.hpp @@ -1159,15 +1159,15 @@ namespace xsimd inline batch slide_left(batch const& x, requires_arch) noexcept { return wasm_i8x16_shuffle( - wasm_i64x2_const(0, 0), x, ((N)&0xF0) ? 0 : 16 - ((N)&0xF), - ((N)&0xF0) ? 0 : 17 - ((N)&0xF), ((N)&0xF0) ? 0 : 18 - ((N)&0xF), - ((N)&0xF0) ? 0 : 19 - ((N)&0xF), ((N)&0xF0) ? 0 : 20 - ((N)&0xF), - ((N)&0xF0) ? 0 : 21 - ((N)&0xF), ((N)&0xF0) ? 0 : 22 - ((N)&0xF), - ((N)&0xF0) ? 0 : 23 - ((N)&0xF), ((N)&0xF0) ? 0 : 24 - ((N)&0xF), - ((N)&0xF0) ? 0 : 25 - ((N)&0xF), ((N)&0xF0) ? 0 : 26 - ((N)&0xF), - ((N)&0xF0) ? 0 : 27 - ((N)&0xF), ((N)&0xF0) ? 0 : 28 - ((N)&0xF), - ((N)&0xF0) ? 0 : 29 - ((N)&0xF), ((N)&0xF0) ? 0 : 30 - ((N)&0xF), - ((N)&0xF0) ? 0 : 31 - ((N)&0xF)); + wasm_i64x2_const(0, 0), x, ((N) & 0xF0) ? 0 : 16 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 17 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 18 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 19 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 20 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 21 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 22 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 23 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 24 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 25 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 26 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 27 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 28 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 29 - ((N) & 0xF), ((N) & 0xF0) ? 0 : 30 - ((N) & 0xF), + ((N) & 0xF0) ? 0 : 31 - ((N) & 0xF)); } // slide_right @@ -1175,15 +1175,15 @@ namespace xsimd inline batch slide_right(batch const& x, requires_arch) noexcept { return wasm_i8x16_shuffle( - x, wasm_i64x2_const(0, 0), ((N)&0xF0) ? 16 : ((N)&0xF) + 0, - ((N)&0xF0) ? 16 : ((N)&0xF) + 1, ((N)&0xF0) ? 16 : ((N)&0xF) + 2, - ((N)&0xF0) ? 16 : ((N)&0xF) + 3, ((N)&0xF0) ? 16 : ((N)&0xF) + 4, - ((N)&0xF0) ? 16 : ((N)&0xF) + 5, ((N)&0xF0) ? 16 : ((N)&0xF) + 6, - ((N)&0xF0) ? 16 : ((N)&0xF) + 7, ((N)&0xF0) ? 16 : ((N)&0xF) + 8, - ((N)&0xF0) ? 16 : ((N)&0xF) + 9, ((N)&0xF0) ? 16 : ((N)&0xF) + 10, - ((N)&0xF0) ? 16 : ((N)&0xF) + 11, ((N)&0xF0) ? 16 : ((N)&0xF) + 12, - ((N)&0xF0) ? 16 : ((N)&0xF) + 13, ((N)&0xF0) ? 16 : ((N)&0xF) + 14, - ((N)&0xF0) ? 16 : ((N)&0xF) + 15); + x, wasm_i64x2_const(0, 0), ((N) & 0xF0) ? 16 : ((N) & 0xF) + 0, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 1, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 2, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 3, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 4, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 5, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 6, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 7, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 8, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 9, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 10, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 11, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 12, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 13, ((N) & 0xF0) ? 16 : ((N) & 0xF) + 14, + ((N) & 0xF0) ? 16 : ((N) & 0xF) + 15); } // sadd diff --git a/include/xsimd/config/xsimd_arch.hpp b/include/xsimd/config/xsimd_arch.hpp index 276b9e469..fe8c54166 100644 --- a/include/xsimd/config/xsimd_arch.hpp +++ b/include/xsimd/config/xsimd_arch.hpp @@ -191,9 +191,9 @@ namespace xsimd { }; using all_x86_architectures = arch_list< - avx512vnni, avx512vbmi, avx512ifma, avx512pf, avx512vnni, avx512bw, avx512er, avx512dq, avx512cd, avx512f, - avxvnni, fma3, avx2, fma3, avx, fma4, fma3, - sse4_2, sse4_1, /*sse4a,*/ ssse3, sse3, sse2>; + avx512vnni, avx512vbmi, avx512ifma, avx512pf, avx512vnni, avx512bw, avx512er, avx512dq, avx512cd, avx512f, + avxvnni, fma3, avx2, fma3, avx, fma4, fma3, + sse4_2, sse4_1, /*sse4a,*/ ssse3, sse3, sse2>; using all_sve_architectures = arch_list, detail::sve<256>, detail::sve<128>>; using all_rvv_architectures = arch_list, detail::rvv<256>, detail::rvv<128>>; diff --git a/include/xsimd/types/xsimd_all_registers.hpp b/include/xsimd/types/xsimd_all_registers.hpp index 60a6cb6f0..4350ca0a2 100644 --- a/include/xsimd/types/xsimd_all_registers.hpp +++ b/include/xsimd/types/xsimd_all_registers.hpp @@ -22,8 +22,8 @@ #include "xsimd_fma3_avx2_register.hpp" #include "xsimd_fma3_avx_register.hpp" -#include "xsimd_avx512vnni_avx512vbmi_register.hpp" #include "xsimd_avx512vnni_avx512bw_register.hpp" +#include "xsimd_avx512vnni_avx512vbmi_register.hpp" #include "xsimd_avx512ifma_register.hpp" #include "xsimd_avx512vbmi_register.hpp" diff --git a/include/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp b/include/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp index 36f61e408..85edbdf23 100644 --- a/include/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp +++ b/include/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp @@ -16,7 +16,7 @@ namespace xsimd { - template + template struct avx512vnni; /** @@ -24,7 +24,7 @@ namespace xsimd * * AVX512VNNI instructions */ - template<> + template <> struct avx512vnni : avx512bw { static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VNNI_AVX512BW; } diff --git a/include/xsimd/types/xsimd_avx512vnni_avx512vbmi_register.hpp b/include/xsimd/types/xsimd_avx512vnni_avx512vbmi_register.hpp index 647e26718..232b19a5c 100644 --- a/include/xsimd/types/xsimd_avx512vnni_avx512vbmi_register.hpp +++ b/include/xsimd/types/xsimd_avx512vnni_avx512vbmi_register.hpp @@ -16,7 +16,7 @@ namespace xsimd { - template + template struct avx512vnni; /** @@ -24,7 +24,7 @@ namespace xsimd * * AVX512VNNI instructions */ - template<> + template <> struct avx512vnni : avx512vbmi { static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VNNI_AVX512VBMI; } diff --git a/include/xsimd/types/xsimd_batch_constant.hpp b/include/xsimd/types/xsimd_batch_constant.hpp index bf2b9569e..0de9c8ad4 100644 --- a/include/xsimd/types/xsimd_batch_constant.hpp +++ b/include/xsimd/types/xsimd_batch_constant.hpp @@ -88,7 +88,7 @@ namespace xsimd #define MAKE_BINARY_OP(OP, NAME) \ template \ constexpr auto operator OP(batch_bool_constant other) const \ - ->decltype(apply(*this, other)) \ + -> decltype(apply(*this, other)) \ { \ return apply(*this, other); \ } @@ -199,7 +199,7 @@ namespace xsimd #define MAKE_BINARY_OP(OP, NAME) \ template \ constexpr auto operator OP(batch_constant other) const \ - ->decltype(apply(*this, other)) \ + -> decltype(apply(*this, other)) \ { \ return apply(*this, other); \ }