Skip to content

Commit

Permalink
Upgrade formatting to clang-format-17
Browse files Browse the repository at this point in the history
  • Loading branch information
serge-sans-paille committed Dec 12, 2023
1 parent 1700186 commit 9b347ee
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/[email protected]
with:
clang-format-version: '16'
clang-format-version: '17'
exclude-regex: 'doctest.h'
inlining-check:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion include/xsimd/arch/xsimd_rvv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ namespace xsimd
const auto imag_index = vindex<A, as_unsigned_integer_t<T>, 1, 1>();
const auto index = rvvabut<as_unsigned_integer_t<T>, A::width>(real_index, imag_index);
const auto input = rvvabut<T, A::width>(lo.data, hi.data);
const rvv_reg_t<T, A::width* 2> result = __riscv_vrgather(input, index, index.vl);
const rvv_reg_t<T, A::width * 2> result = __riscv_vrgather(input, index, index.vl);

return { rvvget_lo<T, A::width>(result), rvvget_hi<T, A::width>(result) };
}
Expand Down
36 changes: 18 additions & 18 deletions include/xsimd/arch/xsimd_wasm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,31 +1159,31 @@ namespace xsimd
inline batch<T, A> slide_left(batch<T, A> const& x, requires_arch<wasm>) 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
template <size_t N, class A, class T>
inline batch<T, A> slide_right(batch<T, A> const& x, requires_arch<wasm>) 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
Expand Down
6 changes: 3 additions & 3 deletions include/xsimd/config/xsimd_arch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ namespace xsimd
{
};
using all_x86_architectures = arch_list<
avx512vnni<avx512vbmi>, avx512vbmi, avx512ifma, avx512pf, avx512vnni<avx512bw>, avx512bw, avx512er, avx512dq, avx512cd, avx512f,
avxvnni, fma3<avx2>, avx2, fma3<avx>, avx, fma4, fma3<sse4_2>,
sse4_2, sse4_1, /*sse4a,*/ ssse3, sse3, sse2>;
avx512vnni<avx512vbmi>, avx512vbmi, avx512ifma, avx512pf, avx512vnni<avx512bw>, avx512bw, avx512er, avx512dq, avx512cd, avx512f,
avxvnni, fma3<avx2>, avx2, fma3<avx>, avx, fma4, fma3<sse4_2>,
sse4_2, sse4_1, /*sse4a,*/ ssse3, sse3, sse2>;

using all_sve_architectures = arch_list<detail::sve<512>, detail::sve<256>, detail::sve<128>>;
using all_rvv_architectures = arch_list<detail::rvv<512>, detail::rvv<256>, detail::rvv<128>>;
Expand Down
2 changes: 1 addition & 1 deletion include/xsimd/types/xsimd_all_registers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/types/xsimd_avx512vnni_avx512bw_register.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

namespace xsimd
{
template<typename arch>
template <typename arch>
struct avx512vnni;

/**
* @ingroup architectures
*
* AVX512VNNI instructions
*/
template<>
template <>
struct avx512vnni<avx512bw> : avx512bw
{
static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VNNI_AVX512BW; }
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/types/xsimd_avx512vnni_avx512vbmi_register.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

namespace xsimd
{
template<typename arch>
template <typename arch>
struct avx512vnni;

/**
* @ingroup architectures
*
* AVX512VNNI instructions
*/
template<>
template <>
struct avx512vnni<avx512vbmi> : avx512vbmi
{
static constexpr bool supported() noexcept { return XSIMD_WITH_AVX512VNNI_AVX512VBMI; }
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/types/xsimd_batch_constant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace xsimd
#define MAKE_BINARY_OP(OP, NAME) \
template <bool... OtherValues> \
constexpr auto operator OP(batch_bool_constant<batch_type, OtherValues...> other) const \
->decltype(apply<NAME>(*this, other)) \
-> decltype(apply<NAME>(*this, other)) \
{ \
return apply<NAME>(*this, other); \
}
Expand Down Expand Up @@ -199,7 +199,7 @@ namespace xsimd
#define MAKE_BINARY_OP(OP, NAME) \
template <value_type... OtherValues> \
constexpr auto operator OP(batch_constant<batch_type, OtherValues...> other) const \
->decltype(apply<NAME>(*this, other)) \
-> decltype(apply<NAME>(*this, other)) \
{ \
return apply<NAME>(*this, other); \
}
Expand Down

0 comments on commit 9b347ee

Please sign in to comment.