Lines Matching refs:tuning
64 const Hash_tuning *tuning; member
479 hash_reset_tuning (Hash_tuning *tuning) in hash_reset_tuning() argument
481 *tuning = default_tuning; in hash_reset_tuning()
514 const Hash_tuning *tuning = table->tuning; in check_tuning() local
516 if (tuning == &default_tuning) in check_tuning()
526 if (epsilon < tuning->growth_threshold in check_tuning()
527 && tuning->growth_threshold < 1 - epsilon in check_tuning()
528 && 1 + epsilon < tuning->growth_factor in check_tuning()
529 && 0 <= tuning->shrink_threshold in check_tuning()
530 && tuning->shrink_threshold + epsilon < tuning->shrink_factor in check_tuning()
531 && tuning->shrink_factor <= 1 in check_tuning()
532 && tuning->shrink_threshold + epsilon < tuning->growth_threshold) in check_tuning()
535 table->tuning = &default_tuning; in check_tuning()
544 compute_bucket_size (size_t candidate, const Hash_tuning *tuning) in compute_bucket_size() argument
546 if (!tuning->is_n_buckets) in compute_bucket_size()
548 float new_candidate = candidate / tuning->growth_threshold; in compute_bucket_size()
594 hash_initialize (size_t candidate, const Hash_tuning *tuning, in hash_initialize() argument
609 if (!tuning) in hash_initialize()
610 tuning = &default_tuning; in hash_initialize()
611 table->tuning = tuning; in hash_initialize()
622 table->n_buckets = compute_bucket_size (candidate, tuning); in hash_initialize()
947 size_t new_size = compute_bucket_size (candidate, table->tuning); in hash_rehash()
961 new_table->tuning = table->tuning; in hash_rehash()
1064 > table->tuning->growth_threshold * table->n_buckets) in hash_insert_if_absent()
1070 > table->tuning->growth_threshold * table->n_buckets) in hash_insert_if_absent()
1072 const Hash_tuning *tuning = table->tuning; in hash_insert_if_absent() local
1074 (tuning->is_n_buckets in hash_insert_if_absent()
1075 ? (table->n_buckets * tuning->growth_factor) in hash_insert_if_absent()
1076 : (table->n_buckets * tuning->growth_factor in hash_insert_if_absent()
1077 * tuning->growth_threshold)); in hash_insert_if_absent()
1166 < table->tuning->shrink_threshold * table->n_buckets) in hash_delete()
1172 < table->tuning->shrink_threshold * table->n_buckets) in hash_delete()
1174 const Hash_tuning *tuning = table->tuning; in hash_delete() local
1176 (tuning->is_n_buckets in hash_delete()
1177 ? table->n_buckets * tuning->shrink_factor in hash_delete()
1178 : (table->n_buckets * tuning->shrink_factor in hash_delete()
1179 * tuning->growth_threshold)); in hash_delete()