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

Function VisitBitRuns

cpp/src/arrow/util/bit_run_reader.h:472–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470
471template <typename Visit>
472inline Status VisitBitRuns(const uint8_t* bitmap, int64_t offset, int64_t length,
473 Visit&& visit) {
474 if (bitmap == NULLPTR) {
475 // Assuming all set (as in a null bitmap)
476 return visit(static_cast<int64_t>(0), length, true);
477 }
478 BitRunReader reader(bitmap, offset, length);
479 int64_t position = 0;
480 while (true) {
481 const auto run = reader.NextRun();
482 if (run.length == 0) {
483 break;
484 }
485 ARROW_RETURN_NOT_OK(visit(position, run.length, run.set));
486 position += run.length;
487 }
488 return Status::OK();
489}
490
491// XXX: Try to make this function small so the compiler can inline and optimize
492// the `visit` function, which is normally a hot loop with vectorizable code.

Callers 10

BenchVisitBitRunsMethod · 0.85
LogicalNullCountFunction · 0.85
SetLogicalNullBitsFunction · 0.85
DecodeArrowMethod · 0.85
DecodeArrowDenseMethod · 0.85
DecodeArrowMethod · 0.85
DecodeArrowDenseMethod · 0.85
DecodeArrowDenseMethod · 0.85
DecodeArrowDenseMethod · 0.85
LeafReaderClass · 0.85

Calls 2

OKFunction · 0.50
NextRunMethod · 0.45

Tested by

no test coverage detected