MCPcopy Create free account
hub / github.com/apache/arrow / GetBlockSlow

Method GetBlockSlow

cpp/src/arrow/util/bit_block_counter.cc:30–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28namespace internal {
29
30BitBlockCount BitBlockCounter::GetBlockSlow(int64_t block_size) noexcept {
31 const int16_t run_length = static_cast<int16_t>(std::min(bits_remaining_, block_size));
32 int16_t popcount = static_cast<int16_t>(CountSetBits(bitmap_, offset_, run_length));
33 bits_remaining_ -= run_length;
34 // This code path should trigger _at most_ 2 times. In the "two times"
35 // case, the first time the run length will be a multiple of 8 by construction
36 bitmap_ += run_length / 8;
37 return {run_length, popcount};
38}
39
40OptionalBitBlockCounter::OptionalBitBlockCounter(const uint8_t* validity_bitmap,
41 int64_t offset, int64_t length)

Callers

nothing calls this directly

Calls 1

CountSetBitsFunction · 0.70

Tested by

no test coverage detected