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

Function VisitSetBitRuns

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

Source from the content-addressed store, hash-verified

488// - un-inline NextRun hurts 'many null' cases a bit, but improves normal cases
489template <typename Visit>
490inline Status VisitSetBitRuns(const uint8_t* bitmap, int64_t offset, int64_t length,
491 Visit&& visit) {
492 if (bitmap == NULLPTR) {
493 // Assuming all set (as in a null bitmap)
494 return visit(static_cast<int64_t>(0), static_cast<int64_t>(length));
495 }
496 SetBitRunReader reader(bitmap, offset, length);
497 while (true) {
498 const auto run = reader.NextRun();
499 if (run.length == 0) {
500 break;
501 }
502 ARROW_RETURN_NOT_OK(visit(run.position, run.length));
503 }
504 return Status::OK();
505}
506
507template <typename Visit>
508inline void VisitSetBitRunsVoid(const uint8_t* bitmap, int64_t offset, int64_t length,

Callers 5

CheckIndexBoundsImplFunction · 0.85
BinaryFilterNonNullImplFunction · 0.85
VisitListViewMethod · 0.85
UpdateSpacedMethod · 0.85

Calls 3

OKFunction · 0.50
NextRunMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected