Lines Matching defs:Key
63 for (const HashedKey<StoreKey>& key : keys_) {
64 DCHECK(key.Key() != nullptr);
65 alloc_.Destroy(key.Key());
74 DCHECK(it->Key() != nullptr);
75 return it->Key();
92 for (const HashedKey<StoreKey>& key : keys_) {
93 auto it = stats.find(key.Hash());
95 stats.insert({key.Hash(), 1u});
115 HashedKey(size_t hash, const T* key) : hash_(hash), key_(key) { }
121 const T* Key() const {
126 return Key() == nullptr;
140 bool IsEmpty(const HashedKey<StoreKey>& key) const {
141 return key.IsEmpty();
144 void MakeEmpty(HashedKey<StoreKey>& key) {
145 key.MakeEmpty();
151 size_t operator()(const HashedKey<T>& key) const {
152 return key.Hash();
159 DCHECK(lhs.Key() != nullptr);
160 DCHECK(rhs.Key() != nullptr);
161 // Rehashing: stored keys are already deduplicated, so we can simply compare key pointers.
162 return lhs.Key() == rhs.Key();
167 DCHECK(lhs.Key() != nullptr);
168 DCHECK(rhs.Key() != nullptr);
170 lhs.Key()->size() == rhs.Key()->size() &&
171 std::equal(lhs.Key()->begin(), lhs.Key()->end(), rhs.Key()->begin());
188 Thread* self, const InKey& key) {
193 HashType raw_hash = HashFunc()(key);
200 return shards_[shard_bin]->Add(self, shard_hash, key);