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

Function bit_array_set

src/butil/bit_array.h:56–59  ·  view source on GitHub ↗

Set i-th bit (from left, counting from 0) of |array| to be 1

Source from the content-addressed store, hash-verified

54
55// Set i-th bit (from left, counting from 0) of |array| to be 1
56inline void bit_array_set(uint64_t* array, size_t i) {
57 const size_t off = (i >> 6);
58 array[off] |= (((uint64_t)1) << (i - (off << 6)));
59}
60
61// Set i-th bit (from left, counting from 0) of |array| to be 0
62inline void bit_array_unset(uint64_t* array, size_t i) {

Callers 5

InitSupportedCommandMapFunction · 0.85
InitSupportedCommandMapFunction · 0.85
flat_map_inl.hFile · 0.85
operator[]Method · 0.85
resizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected