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 78cce4a
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_tu), , vec(vec, vec, bvec))
}
// 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);
auto zero = broadcast<A>(T(0), rvv {});
return detail::rvvcompress(zero, x, mask);
}

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

0 comments on commit 78cce4a

Please sign in to comment.