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

Function CountAndSetBits

cpp/src/arrow/util/bitmap_ops.cc:91–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91int64_t CountAndSetBits(const uint8_t* left_bitmap, int64_t left_offset,
92 const uint8_t* right_bitmap, int64_t right_offset,
93 int64_t length) {
94 BinaryBitBlockCounter bit_counter(left_bitmap, left_offset, right_bitmap, right_offset,
95 length);
96 int64_t count = 0;
97 while (true) {
98 BitBlockCount block = bit_counter.NextAndWord();
99 if (block.length == 0) {
100 break;
101 }
102 count += block.popcount;
103 }
104 return count;
105}
106
107namespace {
108

Callers 2

true_countMethod · 0.85
GetTrueCountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected