Lines Matching refs:hash
1 /* Generic hash table
7 #include "hash.h"
31 // resizing should be optional, though, in case the hash is used at times
113 uint32_t hash;
118 hash = table->hash_func(element, NULL, table->table_size);
119 PUT_IN_NEXT(table, element, table->table[hash]);
120 table->table[hash] = (struct hash_element *)element;
123 // ToDo: resize hash table if it's grown too much!
132 uint32_t hash = table->hash_func(_element, NULL, table->table_size);
135 for (element = table->table[hash]; element != NULL;
142 table->table[hash] = (struct hash_element *)NEXT(table, element);
211 uint32_t hash = table->hash_func(searchedElement, NULL, table->table_size);
214 for (element = table->table[hash]; element != NULL; element = NEXT(table, element)) {
226 uint32_t hash = table->hash_func(NULL, key, table->table_size);
229 for (element = table->table[hash]; element != NULL; element = NEXT(table, element)) {
297 uint32_t hash = 0;
300 // we assume hash to be at least 32 bits
302 hash ^= hash >> 28;
303 hash <<= 4;
304 hash ^= c;
307 return hash;