File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ template <typename HashFamily>
266266SimdBlockFilterFixed64<HashFamily>::Add(const uint64_t key) noexcept {
267267 const auto hash = hasher_ (key);
268268 const uint32_t bucket_idx = reduce (rotl64 (hash, 32 ), bucketCount);
269- mask64bytes_t mask = MakeMask (key );
269+ mask64bytes_t mask = MakeMask (hash );
270270 mask64bytes_t * const bucket = &reinterpret_cast <mask64bytes_t *>(directory_)[bucket_idx];
271271 bucket->first = _mm256_or_si256 (mask.first , bucket->first );
272272 bucket->second = _mm256_or_si256 (mask.second , bucket->second );
@@ -278,7 +278,7 @@ template <typename HashFamily>
278278SimdBlockFilterFixed64<HashFamily>::Find(const uint64_t key) const noexcept {
279279 const auto hash = hasher_ (key);
280280 const uint32_t bucket_idx = reduce (rotl64 (hash, 32 ), bucketCount);
281- const mask64bytes_t mask = MakeMask (key );
281+ const mask64bytes_t mask = MakeMask (hash );
282282 const mask64bytes_t bucket = reinterpret_cast <mask64bytes_t *>(directory_)[bucket_idx];
283283 return _mm256_testc_si256 (bucket.first , mask.first ) & _mm256_testc_si256 (bucket.second , mask.second );
284284}
You can’t perform that action at this time.
0 commit comments