MCPcopy Create free account
hub / github.com/bytedance/bolt / simpleCountBits

Function simpleCountBits

bolt/common/base/tests/BitUtilTest.cpp:106–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104 }
105};
106
107static int32_t
108simpleCountBits(const uint64_t* bits, int32_t begin, int32_t end) {
109 int32_t count = 0;
110 for (int32_t i = begin; i < end; ++i) {
111 count += isBitSet(bits, i);
112 }
113 return count;
114}
115
116TEST_F(BitUtilTest, countBits) {

Callers 1

TEST_FFunction · 0.85

Calls 1

isBitSetFunction · 0.85

Tested by

no test coverage detected