97 void set_range_within_word (idx_t beg, idx_t end);
98 void clear_range_within_word (idx_t beg, idx_t end);
99 void par_put_range_within_word (idx_t beg, idx_t end, bool value);
100
101 // Ranges spanning entire words.
102 void set_range_of_words (idx_t beg, idx_t end);
103 void clear_range_of_words (idx_t beg, idx_t end);
104 void set_large_range_of_words (idx_t beg, idx_t end);
105 void clear_large_range_of_words (idx_t beg, idx_t end);
106
107 static void clear_range_of_words(bm_word_t* map, idx_t beg, idx_t end);
108
109 // The index of the first full word in a range.
110 idx_t word_index_round_up(idx_t bit) const;
111
112 // Verification.
113 void verify_index(idx_t index) const NOT_DEBUG_RETURN;
114 void verify_range(idx_t beg_index, idx_t end_index) const NOT_DEBUG_RETURN;
115
116 // Statistics.
117 static idx_t* _pop_count_table;
118 static void init_pop_count_table();
119 static idx_t num_set_bits(bm_word_t w);
120 static idx_t num_set_bits_from_table(unsigned char c);
121
122 // Allocation Helpers.
123
124 // Allocates and clears the bitmap memory.
125 template <class Allocator>
126 static bm_word_t* allocate(const Allocator&, idx_t size_in_bits);
127
128 // Reallocates and clears the new bitmap memory.
129 template <class Allocator>
130 static bm_word_t* reallocate(const Allocator&, bm_word_t* map, idx_t old_size_in_bits, idx_t new_size_in_bits);
131
132 // Free the bitmap memory.
133 template <class Allocator>
134 static void free(const Allocator&, bm_word_t* map, idx_t size_in_bits);
135
136 // Protected functions, that are used by BitMap sub-classes that support them.
137
|
97 void set_range_within_word (idx_t beg, idx_t end);
98 void clear_range_within_word (idx_t beg, idx_t end);
99 void par_put_range_within_word (idx_t beg, idx_t end, bool value);
100
101 // Ranges spanning entire words.
102 void set_range_of_words (idx_t beg, idx_t end);
103 void clear_range_of_words (idx_t beg, idx_t end);
104 void set_large_range_of_words (idx_t beg, idx_t end);
105 void clear_large_range_of_words (idx_t beg, idx_t end);
106
107 static void clear_range_of_words(bm_word_t* map, idx_t beg, idx_t end);
108
109 // The index of the first full word in a range.
110 idx_t word_index_round_up(idx_t bit) const;
111
112 // Verification.
113 void verify_index(idx_t index) const NOT_DEBUG_RETURN;
114 void verify_range(idx_t beg_index, idx_t end_index) const NOT_DEBUG_RETURN;
115
116 // Statistics.
117 static const idx_t* _pop_count_table;
118 static void init_pop_count_table();
119 static idx_t num_set_bits(bm_word_t w);
120 static idx_t num_set_bits_from_table(unsigned char c);
121
122 // Allocation Helpers.
123
124 // Allocates and clears the bitmap memory.
125 template <class Allocator>
126 static bm_word_t* allocate(const Allocator&, idx_t size_in_bits);
127
128 // Reallocates and clears the new bitmap memory.
129 template <class Allocator>
130 static bm_word_t* reallocate(const Allocator&, bm_word_t* map, idx_t old_size_in_bits, idx_t new_size_in_bits);
131
132 // Free the bitmap memory.
133 template <class Allocator>
134 static void free(const Allocator&, bm_word_t* map, idx_t size_in_bits);
135
136 // Protected functions, that are used by BitMap sub-classes that support them.
137
|