| 224 | } |
| 225 | |
| 226 | inline void BloomFilterBuilder::AddKey(const BloomKeyProbe &probe) { |
| 227 | uint32_t h = probe.initial_hash(); |
| 228 | for (size_t i = 0; i < n_hashes_; i++) { |
| 229 | uint32_t bitpos = BloomFilter::PickBit(h, n_bits_); |
| 230 | BitmapSet(&bitmap_[0], bitpos); |
| 231 | h = probe.MixHash(h); |
| 232 | } |
| 233 | n_inserted_++; |
| 234 | } |
| 235 | |
| 236 | inline bool BloomFilter::MayContainKey(const BloomKeyProbe &probe) const { |
| 237 | uint32_t h = probe.initial_hash(); |