MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / LowestOneBitValue

Function LowestOneBitValue

Bcore/src/main/cpp/base/bit_utils.h:328–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326// Returns value with bit set in lowest one-bit position or 0 if 0. (java.lang.X.lowestOneBit).
327template <typename kind>
328inline static kind LowestOneBitValue(kind opnd) {
329 // Hacker's Delight, Section 2-1
330 return opnd & -opnd;
331}
332
333// Returns value with bit set in hightest one-bit position or 0 if 0. (java.lang.X.highestOneBit).
334template <typename T>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected