Home | History | Annotate | Download | only in lib

Lines Matching defs:tuning

63     /* Tuning arguments, kept in a physicaly separate structure.  */
64 const Hash_tuning *tuning;
128 /* Use this to initialize or reset a TUNING structure to
472 hash_reset_tuning (Hash_tuning *tuning)
474 *tuning = default_tuning;
477 /* For the given hash TABLE, check the user supplied tuning structure for
479 Otherwise, definitively reset the TUNING field to some acceptable default
481 tuning arguments), and return false. */
486 const Hash_tuning *tuning = table->tuning;
495 if (epsilon < tuning->growth_threshold
496 && tuning->growth_threshold < 1 - epsilon
497 && 1 + epsilon < tuning->growth_factor
498 && 0 <= tuning->shrink_threshold
499 && tuning->shrink_threshold + epsilon < tuning->shrink_factor
500 && tuning->shrink_factor <= 1
501 && tuning->shrink_threshold + epsilon < tuning->growth_threshold)
504 table->tuning = &default_tuning;
514 the IS_N_BUCKETS field of the TUNING structure is true, the CANDIDATE
517 TUNING points to a structure of user-supplied values, in case some fine
518 tuning is wanted over the default behavior of the hasher. If TUNING is
519 NULL, the default tuning
540 hash_initialize (size_t candidate, const Hash_tuning *tuning,
553 if (!tuning)
554 tuning = &default_tuning;
555 table->tuning = tuning;
558 /* Fail if the tuning options are invalid. This is the only occasion
560 if the user provides invalid tuning options, we silently revert to
561 using the defaults, and ignore further request to change the tuning
566 if (!tuning->is_n_buckets)
568 float new_candidate = candidate / tuning->growth_threshold;
815 occurs. If TUNING->IS_N_BUCKETS is true, then CANDIDATE specifies the
826 new_table = hash_initialize (candidate, table->tuning, table->hasher,
951 > table->tuning->growth_threshold * table->n_buckets)
953 /* Check more fully, before starting real work. If tuning arguments
957 > table->tuning->growth_threshold * table->n_buckets)
959 const Hash_tuning *tuning = table->tuning;
961 (tuning->is_n_buckets
962 ? (table->n_buckets * tuning->growth_factor)
963 : (table->n_buckets * tuning->growth_factor
964 * tuning->growth_threshold));
1001 < table->tuning->shrink_threshold * table->n_buckets)
1003 /* Check more fully, before starting real work. If tuning arguments
1007 < table->tuning->shrink_threshold * table->n_buckets)
1009 const Hash_tuning *tuning = table->tuning;
1011 (tuning->is_n_buckets
1012 ? table->n_buckets * tuning->shrink_factor
1013 : (table->n_buckets * tuning->shrink_factor
1014 * tuning->growth_threshold));