Lines Matching full:hash
30 int hash;
38 int (*hash)(void* key);
45 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) {
46 assert(hash != NULL);
70 map->hash = hash;
85 int h = map->hash(key);
101 static inline size_t calculateIndex(size_t bucketCount, int hash) {
102 return ((size_t) hash) & (bucketCount - 1);
122 size_t index = calculateIndex(newBucketCount, entry->hash);
174 static Entry* createEntry(void* key, int hash, void* value) {
180 entry->hash = hash;
198 int hash = hashKey(map, key);
199 size_t index = calculateIndex(map->bucketCount, hash);
207 *p = createEntry(key, hash, value);
218 if (equalKeys(current->key, current->hash, key, hash, map->equals)) {
230 int hash = hashKey(map, key);
231 size_t index = calculateIndex(map->bucketCount, hash);
235 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) {
245 int hash = hashKey(map, key);
246 size_t index = calculateIndex(map->bucketCount, hash);
250 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) {
261 int hash = hashKey(map, key);
262 size_t index = calculateIndex(map->bucketCount, hash);
270 *p = createEntry(key, hash, NULL);
283 if (equalKeys(current->key, current->hash, key, hash, map->equals)) {
293 int hash = hashKey(map, key);
294 size_t index = calculateIndex(map->bucketCount, hash);
300 if (equalKeys(current->key, current->hash, key, hash, map->equals)) {