| 79 | class BitmapUInt64Reader { |
| 80 | public: |
| 81 | BitmapUInt64Reader(const uint8_t* bitmap, int64_t start_offset, int64_t length) |
| 82 | : bitmap_(util::MakeNonNull(bitmap) + start_offset / 8), |
| 83 | num_carry_bits_(8 - start_offset % 8), |
| 84 | length_(length), |
| 85 | remaining_length_(length_), |
| 86 | carry_bits_(0) { |
| 87 | if (length_ > 0) { |
| 88 | // Load carry bits from the first byte's MSBs |
| 89 | if (length_ >= num_carry_bits_) { |
| 90 | carry_bits_ = |
| 91 | LoadPartialWord(static_cast<int8_t>(8 - num_carry_bits_), num_carry_bits_); |
| 92 | } else { |
| 93 | carry_bits_ = LoadPartialWord(static_cast<int8_t>(8 - num_carry_bits_), length_); |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | uint64_t NextWord() { |
| 99 | if (ARROW_PREDICT_TRUE(remaining_length_ >= 64 + num_carry_bits_)) { |
nothing calls this directly
no test coverage detected