Skip to content

Commit f54a606

Browse files
committed
Remove is_all_different
1 parent cff4b80 commit f54a606

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

include/xsimd/arch/common/xsimd_common_swizzle.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,13 @@ namespace xsimd
144144
}
145145
template <typename T, T... Vs>
146146
XSIMD_INLINE constexpr bool is_identity() noexcept { return detail::identity_impl<0, T, Vs...>(); }
147-
template <typename T, T... Vs>
148-
XSIMD_INLINE constexpr bool is_all_different() noexcept
149-
{
150-
return detail::bitmask_impl<0, sizeof...(Vs), T, Vs...>() == ((1u << sizeof...(Vs)) - 1);
151-
}
152-
153147
template <typename T, T... Vs>
154148
XSIMD_INLINE constexpr bool is_dup_lo() noexcept { return detail::dup_lo_impl<0, sizeof...(Vs), T, Vs...>(); }
155149
template <typename T, T... Vs>
156150
XSIMD_INLINE constexpr bool is_dup_hi() noexcept { return detail::dup_hi_impl<0, sizeof...(Vs), T, Vs...>(); }
157151
template <typename T, class A, T... Vs>
158152
XSIMD_INLINE constexpr bool is_identity(batch_constant<T, A, Vs...>) noexcept { return is_identity<T, Vs...>(); }
159153
template <typename T, class A, T... Vs>
160-
XSIMD_INLINE constexpr bool is_all_different(batch_constant<T, A, Vs...>) noexcept { return is_all_different<T, Vs...>(); }
161-
template <typename T, class A, T... Vs>
162154
XSIMD_INLINE constexpr bool is_dup_lo(batch_constant<T, A, Vs...>) noexcept { return is_dup_lo<T, Vs...>(); }
163155
template <typename T, class A, T... Vs>
164156
XSIMD_INLINE constexpr bool is_dup_hi(batch_constant<T, A, Vs...>) noexcept { return is_dup_hi<T, Vs...>(); }

include/xsimd/arch/xsimd_common_fwd.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ namespace xsimd
6060
template <typename T, class A, T... Vs>
6161
XSIMD_INLINE constexpr bool is_identity(batch_constant<T, A, Vs...>) noexcept;
6262
template <typename T, class A, T... Vs>
63-
XSIMD_INLINE constexpr bool is_all_different(batch_constant<T, A, Vs...>) noexcept;
64-
template <typename T, class A, T... Vs>
6563
XSIMD_INLINE constexpr bool is_dup_lo(batch_constant<T, A, Vs...>) noexcept;
6664
template <typename T, class A, T... Vs>
6765
XSIMD_INLINE constexpr bool is_dup_hi(batch_constant<T, A, Vs...>) noexcept;

test/test_batch_manip.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ namespace xsimd
2626
// compile-time tests (identity, all-different, dup-lo, dup-hi)
2727
// 8-lane identity
2828
static_assert(is_identity<std::uint32_t, 0, 1, 2, 3, 4, 5, 6, 7>(), "identity failed");
29-
// 8-lane reverse is all-different but not identity
30-
static_assert(is_all_different<std::uint32_t, 7, 6, 5, 4, 3, 2, 1, 0>(), "all-diff failed");
29+
// 8-lane reverse is not identity
3130
static_assert(!is_identity<std::uint32_t, 7, 6, 5, 4, 3, 2, 1, 0>(), "identity on reverse");
3231
// 8-lane dup-lo (repeat 0..3 twice)
3332
static_assert(is_dup_lo<std::uint32_t, 0, 1, 2, 3, 0, 1, 2, 3>(), "dup_lo failed");
@@ -38,8 +37,7 @@ namespace xsimd
3837
// ────────────────────────────────────────────────────────────────────────
3938
// 4-lane identity
4039
static_assert(is_identity<std::uint32_t, 0, 1, 2, 3>(), "4-lane identity failed");
41-
// 4-lane reverse all-different but not identity
42-
static_assert(is_all_different<std::uint32_t, 3, 2, 1, 0>(), "4-lane all-diff failed");
40+
// 4-lane reverse is not identity
4341
static_assert(!is_identity<std::uint32_t, 3, 2, 1, 0>(), "4-lane identity on reverse");
4442
// 4-lane dup-lo (repeat 0..1 twice)
4543
static_assert(is_dup_lo<std::uint32_t, 0, 1, 0, 1>(), "4-lane dup_lo failed");

0 commit comments

Comments
 (0)