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

Function CountAndSetBits

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

Source from the content-addressed store, hash-verified

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

Callers 2

true_countMethod · 0.85
GetTrueCountFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected