Skip to content

Commit 2729b03

Browse files
Specialize xsimd::compress for riscv
1 parent 45c16e2 commit 2729b03

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/xsimd/arch/xsimd_rvv.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,20 @@ namespace xsimd
11241124
return detail::rvvmsge(lhs, rhs);
11251125
}
11261126

1127+
/*************
1128+
* Selection *
1129+
*************/
1130+
namespace detail
1131+
{
1132+
XSIMD_RVV_OVERLOAD(rvvcompress, (__riscv_vcompress), , vec(vec, bvec))
1133+
}
1134+
// compress
1135+
template <class A, class T>
1136+
inline batch<T, A> compress(batch<T, A> const& x, batch_bool<T, A> const& mask, requires_arch<rvv>) noexcept
1137+
{
1138+
return detail::rvvcompress(x, mask);
1139+
}
1140+
11271141
/***************
11281142
* Permutation *
11291143
***************/

0 commit comments

Comments
 (0)