Lines Matching defs:bit

41   typedef size_t idx_t;         // Type used for bit and word indices.
60 // Return the position of bit within the word that contains it (e.g., if
62 static idx_t bit_in_word(idx_t bit) { return bit & (BitsPerWord - 1); }
64 // Return a mask that will select the specified bit, when applied to the word
65 // containing the bit.
66 static bm_word_t bit_mask(idx_t bit) { return (bm_word_t)1 << bit_in_word(bit); }
68 // Return the index of the word containing the specified bit.
69 static idx_t word_index(idx_t bit) { return bit >> LogBitsPerWord; }
71 // Return the bit number of the first bit in the specified word.
78 // Return a pointer to the word containing the specified bit.
79 bm_word_t* word_addr(idx_t bit) const { return map() + word_index(bit); }
101 idx_t word_index_round_up(idx_t bit) const;
133 // Preserves state currently in bit map by copying data.
151 // Align bit index up or down to the next bitmap word boundary, or check
153 static idx_t word_align_up(idx_t bit) {
154 return align_size_up(bit, BitsPerWord);
156 static idx_t word_align_down(idx_t bit) {
157 return align_size_down(bit, BitsPerWord);
159 static bool is_word_aligned(idx_t bit) {
160 return word_align_up(bit) == bit;
163 // Set or clear the specified bit.
164 inline void set_bit(idx_t bit);
165 inline void clear_bit(idx_t bit);
167 // Atomically set or clear the specified bit.
168 inline bool par_set_bit(idx_t bit);
169 inline bool par_clear_bit(idx_t bit);
172 // will CAS the value into the bitmap and is quite a bit slower.
174 // calling thread was the one that changed the value of the bit.
189 // inlines the predominant case of a 1-bit range. Works best when hint is a
277 typedef BitMap::idx_t idx_t; // Type used for bit and word indices.
346 // Callback when bit in map is set. Should normally return "true";