| 37 | } |
| 38 | |
| 39 | bool BitmapBase::DoAllAreSet(const WordType* words, uint64_t num_bits) |
| 40 | { |
| 41 | const size_t last_word_index = num_bits / kBitsPerWord; |
| 42 | const size_t tail_bits = num_bits % kBitsPerWord; |
| 43 | |
| 44 | for (size_t i = 0; i < last_word_index; ++i) |
| 45 | { |
| 46 | if (words[i] != kAllSetMask) |
| 47 | return false; |
| 48 | } |
| 49 | |
| 50 | if (tail_bits > 0) |
| 51 | { |
| 52 | WordType tail_word = words[last_word_index]; |
| 53 | WordType mask = (1ULL << tail_bits) - 1; |
| 54 | if ((tail_word & mask) != mask) |
| 55 | return false; |
| 56 | } |
| 57 | |
| 58 | return true; |
| 59 | } |
| 60 | |
| 61 | bool BitmapBase::DoAllAreClear(const WordType* words, uint64_t num_bits) |
| 62 | { |
nothing calls this directly
no outgoing calls
no test coverage detected