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

Function VisitBitBlocksVoid

cpp/src/arrow/util/bit_block_counter.h:456–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454
455template <typename VisitNotNull, typename VisitNull>
456static 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
482template <typename VisitNotNull, typename VisitNull>
483static Status VisitTwoBitBlocks(const uint8_t* left_bitmap, int64_t left_offset,

Callers 7

VisitVoidMethod · 0.85
VisitVoidMethod · 0.85
VisitVoidMethod · 0.85
VisitVoidMethod · 0.85
VisitTwoBitBlocksVoidFunction · 0.85
VisitRawValuesInlineFunction · 0.85
ConsumeMethod · 0.85

Calls 4

NextBlockMethod · 0.80
NoneSetMethod · 0.80
GetBitFunction · 0.70
AllSetMethod · 0.45

Tested by

no test coverage detected