Skip to content

Commit

Permalink
CR Updates (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
udi-speedb committed Dec 18, 2022
1 parent af7e251 commit 104080d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/speedb/paired_filter/speedb_paired_bloom_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ inline void BuildBlock::SetBlockBloomBits(uint32_t hash, uint32_t set_idx,
size_t hash_set_size) {
for (auto i = 0U; i < hash_set_size; ++i) {
int bitpos = GetBitPosInBlockForHash(hash, set_idx);
// Find the byte, and set the proper bit within that byte
block_address_[bitpos >> 3] |= (char{1} << (bitpos & 7));
hash *= 0x9e3779b9;
}
Expand Down Expand Up @@ -364,6 +365,7 @@ bool ReadBlock::AreAllBlockBloomBitsSetNonAvx2(uint32_t hash, uint32_t set_idx,
size_t hash_set_size) const {
for (auto i = 0U; i < hash_set_size; ++i) {
int bitpos = GetBitPosInBlockForHash(hash, set_idx);
// Find the byte, and check the proper bit within that byte
if ((block_address_[bitpos >> 3] & (char{1} << (bitpos & 7))) == 0) {
return false;
}
Expand Down

0 comments on commit 104080d

Please sign in to comment.