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

Function GetBit

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

Source from the content-addressed store, hash-verified

171static constexpr uint8_t kTrailingBitmask[] = {255, 254, 252, 248, 240, 224, 192, 128};
172
173static constexpr bool GetBit(const uint8_t* bits, uint64_t i) {
174 return (bits[i >> 3] >> (i & 0x07)) & 1;
175}
176
177// Gets the i-th bit from a byte. Should only be used with i <= 7.
178static constexpr bool GetBitFromByte(uint8_t byte, uint8_t i) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected