Lines Matching full:hash
29 int hash;
37 int (*hash)(void* key);
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) {
45 assert(hash != NULL);
69 map->hash = hash;
81 int h = map->hash(key);
97 static inline size_t calculateIndex(size_t bucketCount, int hash) {
98 return ((size_t) hash) & (bucketCount - 1);
118 size_t index = calculateIndex(newBucketCount, entry->hash);
166 static Entry* createEntry(void* key, int hash, void* value) {
172 entry->hash = hash;
190 int hash = hashKey(map, key);
191 size_t index = calculateIndex(map->bucketCount, hash);
199 *p = createEntry(key, hash, value);
210 if (equalKeys(current->key, current->hash, key, hash, map->equals)) {
222 int hash = hashKey(map, key);
223 size_t index = calculateIndex(map->bucketCount, hash);
227 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) {
237 int hash = hashKey(map, key);
238 size_t index = calculateIndex(map->bucketCount, hash);
242 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) {
253 int hash = hashKey(map, key);
254 size_t index = calculateIndex(map->bucketCount, hash);
262 *p = createEntry(key, hash, NULL);
275 if (equalKeys(current->key, current->hash, key, hash, map->equals)) {
285 int hash = hashKey(map, key);
286 size_t index = calculateIndex(map->bucketCount, hash);
292 if (equalKeys(current->key, current->hash, key, hash, map->equals)) {