Skip to content

Commit

Permalink
Force zero tail for risc-v vcompress
Browse files Browse the repository at this point in the history
Fix #1060
  • Loading branch information
serge-sans-paille committed Oct 29, 2024
1 parent e384105 commit 632601d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/xsimd/arch/xsimd_rvv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1129,13 +1129,14 @@ namespace xsimd
*************/
namespace detail
{
XSIMD_RVV_OVERLOAD(rvvcompress, (__riscv_vcompress), , vec(vec, bvec))
XSIMD_RVV_OVERLOAD(rvvcompress, (__riscv_vcompress XSIMD_RVV_M), , vec(vec, bvec, vec))
}
// compress
template <class A, class T>
XSIMD_INLINE batch<T, A> compress(batch<T, A> const& x, batch_bool<T, A> const& mask, requires_arch<rvv>) noexcept
{
return detail::rvvcompress(x, mask);
const auto zero = broadcast<A>(T(0), rvv {});
return detail::rvvcompress(x, mask, zero);
}

/***************
Expand Down

0 comments on commit 632601d

Please sign in to comment.