• Home
  • Raw
  • Download

Lines Matching refs:unit_magnitude

165     return pow2ceiling - h->unit_magnitude - (h->sub_bucket_half_count_magnitude + 1);  in get_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()
184 …ic int64_t value_from_index(int32_t bucket_index, int32_t sub_bucket_index, int32_t unit_magnitude) in value_from_index() argument
186 return ((int64_t) sub_bucket_index) << (bucket_index + unit_magnitude); in value_from_index()
192 int32_t sub_bucket_index = get_sub_bucket_index(value, bucket_index, h->unit_magnitude); in counts_index_for()
208 return value_from_index(bucket_index, sub_bucket_index, h->unit_magnitude); in hdr_value_at_index()
214 int32_t sub_bucket_index = get_sub_bucket_index(value, bucket_index, h->unit_magnitude); in hdr_size_of_equivalent_value_range()
216 return INT64_C(1) << (h->unit_magnitude + adjusted_bucket); in hdr_size_of_equivalent_value_range()
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()
295 …32_t buckets_needed_to_cover_value(int64_t value, int32_t sub_bucket_count, int32_t unit_magnitude) in buckets_needed_to_cover_value() argument
297 int64_t smallest_untrackable_value = ((int64_t) sub_bucket_count) << unit_magnitude; in buckets_needed_to_cover_value()
344 double unit_magnitude = log((double)lowest_trackable_value) / log(2); in hdr_calculate_bucket_config() local
345 if (INT32_MAX < unit_magnitude) in hdr_calculate_bucket_config()
350 cfg->unit_magnitude = (int32_t) unit_magnitude; in hdr_calculate_bucket_config()
353 cfg->sub_bucket_mask = ((int64_t) cfg->sub_bucket_count - 1) << cfg->unit_magnitude; in hdr_calculate_bucket_config()
355 if (cfg->unit_magnitude + cfg->sub_bucket_half_count_magnitude > 61) in hdr_calculate_bucket_config()
360 …eeded_to_cover_value(highest_trackable_value, cfg->sub_bucket_count, (int32_t)cfg->unit_magnitude); in hdr_calculate_bucket_config()
370 h->unit_magnitude = (int32_t)cfg->unit_magnitude; in hdr_init_preallocated()