Skip to content

Commit a7e4cd9

Browse files
committed
Fix shift included size
1 parent 36331bf commit a7e4cd9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/src/arrow/util/bpacking_simd_impl_internal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ auto left_shift_no_overflow(const xsimd::batch<Int, Arch>& batch,
405405
if constexpr (sizeof(Int) == sizeof(uint16_t)) {
406406
return _mm_mullo_epi16(batch, kMults.as_batch());
407407
}
408-
if constexpr (sizeof(Int) == sizeof(uint16_t)) {
408+
if constexpr (sizeof(Int) == sizeof(uint32_t)) {
409409
// TODO that is latency 10 so maybe it is not worth it
410410
return _mm_mullo_epi32(batch, kMults.as_batch());
411411
}
@@ -446,7 +446,7 @@ auto right_shift_by_excess(const xsimd::batch<Int, Arch>& batch,
446446
return xsimd::batch<Int, Arch>(_mm_mullo_epi16(batch, kMults.as_batch())) >>
447447
kMaxRightShift;
448448
}
449-
if constexpr (sizeof(Int) == sizeof(uint16_t)) {
449+
if constexpr (sizeof(Int) == sizeof(uint32_t)) {
450450
// TODO that is latency 10 so maybe it is not worth it
451451
return xsimd::batch<Int, Arch>(_mm_mullo_epi32(batch, kMults.as_batch())) >>
452452
kMaxRightShift;

0 commit comments

Comments
 (0)