Lines Matching refs:hash
29 int hash; member
37 int (*hash)(void* key); member
44 int (*hash)(void* key), bool (*equals)(void* keyA, void* keyB)) { in hashmapCreate()
45 assert(hash != NULL); in hashmapCreate()
69 map->hash = hash; in hashmapCreate()
84 int h = map->hash(key); in hashKey()
96 static inline size_t calculateIndex(size_t bucketCount, int hash) { in calculateIndex() argument
97 return ((size_t) hash) & (bucketCount - 1); in calculateIndex()
117 size_t index = calculateIndex(newBucketCount, entry->hash); in expandIfNecessary()
169 static Entry* createEntry(void* key, int hash, void* value) { in createEntry() argument
175 entry->hash = hash; in createEntry()
193 int hash = hashKey(map, key); in hashmapPut() local
194 size_t index = calculateIndex(map->bucketCount, hash); in hashmapPut()
202 *p = createEntry(key, hash, value); in hashmapPut()
213 if (equalKeys(current->key, current->hash, key, hash, map->equals)) { in hashmapPut()
225 int hash = hashKey(map, key); in hashmapGet() local
226 size_t index = calculateIndex(map->bucketCount, hash); in hashmapGet()
230 if (equalKeys(entry->key, entry->hash, key, hash, map->equals)) { in hashmapGet()
240 int hash = hashKey(map, key); in hashmapRemove() local
241 size_t index = calculateIndex(map->bucketCount, hash); in hashmapRemove()
247 if (equalKeys(current->key, current->hash, key, hash, map->equals)) { in hashmapRemove()