File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ bool BloomFilter::find(const char * data, size_t len)
6262 size_t hash2 = CityHash_v1_0_2::CityHash64WithSeed (data, len, SEED_GEN_A * seed + SEED_GEN_B);
6363
6464 size_t acc = hash1;
65-
6665 for (size_t i = 0 ; i < hashes; ++i)
6766 {
6867 // / It accumulates in the loop as follows:
@@ -80,12 +79,11 @@ void BloomFilter::add(const char * data, size_t len)
8079 size_t hash1 = CityHash_v1_0_2::CityHash64WithSeed (data, len, seed);
8180 size_t hash2 = CityHash_v1_0_2::CityHash64WithSeed (data, len, SEED_GEN_A * seed + SEED_GEN_B);
8281
83- // acc = hash1 + hash2 * i
8482 size_t acc = hash1;
85-
8683 for (size_t i = 0 ; i < hashes; ++i)
8784 {
88- // pos = (hash1 + hash2 * i + i * i) % (8 * size)
85+ // / It accumulates in the loop as follows:
86+ // / pos = (hash1 + hash2 * i + i * i) % (8 * size)
8987 size_t pos = fastMod (acc + i * i);
9088 filter[pos / word_bits] |= (1ULL << (pos % word_bits));
9189 acc += hash2;
You can’t perform that action at this time.
0 commit comments