Lines Matching full:hash
21 // - static uint32_t Hash(K)
51 // Copy val into the hash table, returning a pointer to the copy now in the table.
62 uint32_t hash = Hash(key);
63 int index = hash & (fCapacity-1);
69 if (!s.removed() && hash == s.hash && key == Traits::GetKey(s.val)) {
78 // Remove the value with this key from the hash table.
82 uint32_t hash = Hash(key);
83 int index = hash & (fCapacity-1);
87 if (!s.removed() && hash == s.hash && key == Traits::GetKey(s.val)) {
121 uint32_t hash = Hash(key);
122 int index = hash & (fCapacity-1);
131 s.hash = hash;
135 if (hash == s.hash && key == Traits::GetKey(s.val)) {
172 static uint32_t Hash(const K& key) {
173 uint32_t hash = Traits::Hash(key);
174 return hash < 2 ? hash+2 : hash; // We reserve hash 0 and 1 to mark empty or removed slots.
178 Slot() : hash(0) {}
179 bool empty() const { return this->hash == 0; }
180 bool removed() const { return this->hash == 1; }
182 void markRemoved() { this->hash = 1; }
185 uint32_t hash;
250 static uint32_t Hash(const K& key) { return HashK()(key); }
296 static uint32_t Hash(const T& item) { return HashT()(item); }