29 #include "innodb_utility.h"
31 #define UT_HASH_RANDOM_MASK 1463735687
32 #define UT_HASH_RANDOM_MASK2 1653893711
33 #define UT_RANDOM_1 1.0412321
34 #define UT_RANDOM_2 1.1131347
35 #define UT_RANDOM_3 1.0132677
42 ut_fold_ib_ulint_t_pair(
47 return(((((n1 ^ n2 ^ UT_HASH_RANDOM_MASK2) << 8) + n1)
48 ^ UT_HASH_RANDOM_MASK) + n2);
61 while (*str !=
'\0') {
62 fold = ut_fold_ib_ulint_t_pair(fold, (
ib_ulint_t)(*str));
85 while (pow2 * 2 < n) {
89 if ((
double) n < 1.05 * (
double) pow2) {
95 if ((
double) n > 0.95 * (double) pow2) {
147 table->
array = array;
148 table->n_cells = prime;
151 memset(table->
array, 0x0, table->n_cells *
sizeof(*table->
array));
168 key = key ^ UT_HASH_RANDOM_MASK2;
170 return(key % table_size);
195 return(table->
array + n);