| 454 | |
| 455 | template <typename VisitNotNull, typename VisitNull> |
| 456 | static void VisitBitBlocksVoid(const uint8_t* bitmap, int64_t offset, int64_t length, |
| 457 | VisitNotNull&& visit_not_null, VisitNull&& visit_null) { |
| 458 | internal::OptionalBitBlockCounter bit_counter(bitmap, offset, length); |
| 459 | int64_t position = 0; |
| 460 | while (position < length) { |
| 461 | internal::BitBlockCount block = bit_counter.NextBlock(); |
| 462 | if (block.AllSet()) { |
| 463 | for (int64_t i = 0; i < block.length; ++i, ++position) { |
| 464 | visit_not_null(position); |
| 465 | } |
| 466 | } else if (block.NoneSet()) { |
| 467 | for (int64_t i = 0; i < block.length; ++i, ++position) { |
| 468 | visit_null(); |
| 469 | } |
| 470 | } else { |
| 471 | for (int64_t i = 0; i < block.length; ++i, ++position) { |
| 472 | if (bit_util::GetBit(bitmap, offset + position)) { |
| 473 | visit_not_null(position); |
| 474 | } else { |
| 475 | visit_null(); |
| 476 | } |
| 477 | } |
| 478 | } |
| 479 | } |
| 480 | } |
| 481 | |
| 482 | template <typename VisitNotNull, typename VisitNull> |
| 483 | static Status VisitTwoBitBlocks(const uint8_t* left_bitmap, int64_t left_offset, |
no test coverage detected