MCPcopy Create free account
hub / github.com/apache/brpc / bit_array_get

Function bit_array_get

src/butil/bit_array.h:68–71  ·  view source on GitHub ↗

Get i-th bit (from left, counting from 0) of |array|

Source from the content-addressed store, hash-verified

66
67// Get i-th bit (from left, counting from 0) of |array|
68inline uint64_t bit_array_get(const uint64_t* array, size_t i) {
69 const size_t off = (i >> 6);
70 return (array[off] & (((uint64_t)1) << (i - (off << 6))));
71}
72
73// Find index of first 1-bit from bit |begin| to |end| in |array|.
74// Returns |end| if all bits are 0.

Callers 2

IsSupportedCommandFunction · 0.85
IsSupportedCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected