Skip to content

Commit 114c3f6

Browse files
committed
Fix neq for batch_bool on wasm
1 parent cbf693c commit 114c3f6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/xsimd/arch/xsimd_wasm.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ namespace xsimd
11441144
template <class A>
11451145
XSIMD_INLINE batch_bool<float, A> neq(batch_bool<float, A> const& self, batch_bool<float, A> const& other, requires_arch<wasm>) noexcept
11461146
{
1147-
return wasm_f32x4_ne(self, other);
1147+
return wasm_v128_xor(self, other);
11481148
}
11491149
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
11501150
XSIMD_INLINE batch_bool<T, A> neq(batch_bool<T, A> const& self, batch_bool<T, A> const& other, requires_arch<wasm>) noexcept
@@ -1160,7 +1160,7 @@ namespace xsimd
11601160
template <class A>
11611161
XSIMD_INLINE batch_bool<double, A> neq(batch_bool<double, A> const& self, batch_bool<double, A> const& other, requires_arch<wasm>) noexcept
11621162
{
1163-
return wasm_f64x2_ne(self, other);
1163+
return wasm_v128_xor(self, other);
11641164
}
11651165

11661166
// reciprocal

test/test_batch_bool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ struct batch_bool_test
518518
// neq
519519
{
520520
CHECK_BATCH_EQ(xsimd::neq(bool_g.half, bool_g.ihalf), bool_g.all_true);
521+
CHECK_BATCH_EQ(xsimd::neq(bool_g.all_true, bool_g.all_true), bool_g.all_false);
521522
}
522523
}
523524

0 commit comments

Comments
 (0)