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

Function GetBitFromByte

cpp/src/arrow/util/bit_util.h:175–177  ·  view source on GitHub ↗

Gets the i-th bit from a byte. Should only be used with i <= 7.

Source from the content-addressed store, hash-verified

173
174// Gets the i-th bit from a byte. Should only be used with i <= 7.
175static constexpr bool GetBitFromByte(uint8_t byte, uint8_t i) {
176 return byte & kBitmask[i];
177}
178
179static inline void ClearBit(uint8_t* bits, int64_t i) {
180 bits[i / 8] &= kFlippedBitmask[i % 8];

Callers 1

VisitBitsUnrolledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected