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

Function SlowCountBits

cpp/src/arrow/util/bit_util_test.cc:297–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297static inline int64_t SlowCountBits(const uint8_t* data, int64_t bit_offset,
298 int64_t length) {
299 int64_t count = 0;
300 for (int64_t i = bit_offset; i < bit_offset + length; ++i) {
301 if (bit_util::GetBit(data, i)) {
302 ++count;
303 }
304 }
305 return count;
306}
307
308TEST(BitUtilTests, TestCountSetBits) {
309 const int kBufferSize = 1000;

Callers 1

TESTFunction · 0.85

Calls 1

GetBitFunction · 0.70

Tested by

no test coverage detected