wgtmac commented on code in PR #14674:
URL: https://github.com/apache/arrow/pull/14674#discussion_r1037891456
##########
cpp/src/arrow/util/bit_stream_utils.h:
##########
@@ -341,11 +344,27 @@ inline int BitReader::GetBatch(int num_bits, T* v, int
batch_size) {
}
if (sizeof(T) == 4) {
- int num_unpacked =
- internal::unpack32(reinterpret_cast<const uint32_t*>(buffer +
byte_offset),
- reinterpret_cast<uint32_t*>(v + i), batch_size - i,
num_bits);
- i += num_unpacked;
- byte_offset += num_unpacked * num_bits / 8;
+ if (num_bits <= 16) {
+#if defined(ARROW_HAVE_AVX512_ICX)
Review Comment:
I am afraid that more if/else will be added here to support more instruction
sets, which makes it less maintainable. Is it possible to move the dispatch
logic into `internal::unpack32` implementation and let the dispatcher do the
job? In this way, we can avoid exposing `arrow/util/bpacking_avx512_icx.h` in
this public header as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]