MCPcopy Create free account
hub / github.com/comaps/comaps / GetFullMask

Function GetFullMask

libs/base/bits.hpp:146–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146constexpr uint64_t GetFullMask(uint8_t numBits)
147{
148 ASSERT_LESS_OR_EQUAL(numBits, 64, ());
149 return numBits == 64 ? std::numeric_limits<uint64_t>::max() : (static_cast<uint64_t>(1) << numBits) - 1;
150}
151
152constexpr bool IsPow2Minus1(uint64_t n)
153{

Callers 3

WriteMethod · 0.85
UNIT_TESTFunction · 0.85
TestCoderFunction · 0.85

Calls

no outgoing calls

Tested by 2

UNIT_TESTFunction · 0.68
TestCoderFunction · 0.68