Skip to content

Commit b201928

Browse files
WIP
1 parent 0132094 commit b201928

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/xsimd/arch/xsimd_rvv.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ namespace xsimd
15451545
auto r_low = __riscv_vredor(low_mask.data.as_mask(), upowers_low, (typename decltype(zero)::register_type)zero, batch_bool<T, A>::size);
15461546

15471547
// The high part requires a sub before the shift.
1548-
auto iota_high = __riscv_vsub(detail::vindex<A, as_unsigned_integer_t<T>>(), 8 * sizeof(T), batch_bool<T, A>::size);
1548+
auto iota_high = __riscv_vsub(iota, 8 * sizeof(T), batch_bool<T, A>::size);
15491549
auto upowers_high = detail::rvvsll(ones, iota_high);
15501550
auto high_mask = self & make_batch_bool_constant<T, UpperHalf, A>();
15511551
auto r_high = __riscv_vredor(high_mask.data.as_mask(), upowers_high, (typename decltype(zero)::register_type)zero, batch_bool<T, A>::size);
@@ -1555,6 +1555,7 @@ namespace xsimd
15551555
}
15561556
else
15571557
{
1558+
// (C) we could generalize (B) but we already cover a lot of case now.
15581559
return mask(self, common {});
15591560
}
15601561
}

0 commit comments

Comments
 (0)