Lines Matching refs:bucket_index
168 static int32_t get_sub_bucket_index(int64_t value, int32_t bucket_index, int32_t unit_magnitude) in get_sub_bucket_index() argument
170 return (int32_t)(value >> (bucket_index + unit_magnitude)); in get_sub_bucket_index()
173 static int32_t counts_index(const struct hdr_histogram* h, int32_t bucket_index, int32_t sub_bucket… in counts_index() argument
177 int32_t bucket_base_index = (bucket_index + 1) << h->sub_bucket_half_count_magnitude; in counts_index()
184 static int64_t value_from_index(int32_t bucket_index, int32_t sub_bucket_index, int32_t unit_magnit… in value_from_index() argument
186 return ((int64_t) sub_bucket_index) << (bucket_index + unit_magnitude); in value_from_index()
191 int32_t bucket_index = get_bucket_index(h, value); in counts_index_for() local
192 int32_t sub_bucket_index = get_sub_bucket_index(value, bucket_index, h->unit_magnitude); in counts_index_for()
194 return counts_index(h, bucket_index, sub_bucket_index); in counts_index_for()
199 int32_t bucket_index = (index >> h->sub_bucket_half_count_magnitude) - 1; in hdr_value_at_index() local
202 if (bucket_index < 0) in hdr_value_at_index()
205 bucket_index = 0; in hdr_value_at_index()
208 return value_from_index(bucket_index, sub_bucket_index, h->unit_magnitude); in hdr_value_at_index()
213 int32_t bucket_index = get_bucket_index(h, value); in hdr_size_of_equivalent_value_range() local
214 int32_t sub_bucket_index = get_sub_bucket_index(value, bucket_index, h->unit_magnitude); in hdr_size_of_equivalent_value_range()
215 …t adjusted_bucket = (sub_bucket_index >= h->sub_bucket_count) ? (bucket_index + 1) : bucket_index; in hdr_size_of_equivalent_value_range()
221 int32_t bucket_index = get_bucket_index(h, value); in lowest_equivalent_value() local
222 int32_t sub_bucket_index = get_sub_bucket_index(value, bucket_index, h->unit_magnitude); in lowest_equivalent_value()
223 return value_from_index(bucket_index, sub_bucket_index, h->unit_magnitude); in lowest_equivalent_value()