Skip to content

Commit e368737

Browse files
committed
Fix batch_bool
1 parent e91290d commit e368737

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

include/xsimd/arch/xsimd_avx.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,13 +1019,13 @@ namespace xsimd
10191019
namespace detail_avx
10201020
{
10211021
template <class A>
1022-
XSIMD_INLINE void maskstore(float* mem, batch_bool<float, A> const& mask, batch<float, A> const& src) noexcept
1022+
XSIMD_INLINE void maskstore(float* mem, batch<int32_t, A> const& mask, batch<float, A> const& src) noexcept
10231023
{
10241024
_mm256_maskstore_ps(mem, mask, src);
10251025
}
10261026

10271027
template <class A>
1028-
XSIMD_INLINE void maskstore(double* mem, batch_bool<double, A> const& mask, batch<double, A> const& src) noexcept
1028+
XSIMD_INLINE void maskstore(double* mem, batch<int64_t, A> const& mask, batch<double, A> const& src) noexcept
10291029
{
10301030
_mm256_maskstore_pd(mem, mask, src);
10311031
}
@@ -1054,9 +1054,10 @@ namespace xsimd
10541054
else
10551055
{
10561056
using fp_t = sized_fp_t<sizeof(T)>;
1057+
using int_t = sized_int_t<sizeof(T)>;
10571058
detail_avx::maskstore<A>(
10581059
reinterpret_cast<fp_t*>(mem),
1059-
mask.as_batch_bool(),
1060+
bitwise_cast<int_t>(mask.as_batch()),
10601061
bitwise_cast<fp_t>(src));
10611062
}
10621063
}

0 commit comments

Comments
 (0)