Lines Matching refs:hash
32 // such that at least two entries both hash to this bucket. When true, we
39 // Mask for 30 bits worth of the hash code that are stored within the bucket to
41 // hash code of the entry's key.
45 // a 30 bit hash code.
69 ssize_t find(ssize_t index, hash_t hash, const void* __restrict__ key) const;
70 size_t add(hash_t hash, const void* __restrict__ entry);
119 // Trim a hash code to 30 bits to match what we store in the bucket's cookie.
120 inline static hash_t trimHash(hash_t hash) {
121 return (hash & Bucket::HASH_MASK) ^ (hash >> 30);
125 // for the specified hash code, given the total number of buckets.
126 // (Primary hash)
127 inline static size_t chainStart(hash_t hash, size_t count) {
128 return hash % count;
132 // in the collision chain for the specified hash code, given the total number of buckets.
133 // (Secondary hash)
134 inline static size_t chainIncrement(hash_t hash, size_t count) {
135 return ((hash >> 7) | (hash << 25)) % (count - 1) + 1;
146 * A BasicHashtable stores entries that are indexed by hash code in place
277 * hash: The hashcode of the key.
280 inline ssize_t find(ssize_t index, hash_t hash, const TKey& key) const {
281 return BasicHashtableImpl::find(index, hash, &key);
290 * hash: The hashcode of the key.
293 inline size_t add(hash_t hash, const TEntry& entry) {
294 return BasicHashtableImpl::add(hash, &entry);
316 * Although the hash codes are cached by the hashtable, rehashing can be an