@@ -201,7 +201,7 @@ inline uint32_t reduce(uint32_t hash, uint32_t n) {
201201// CountingBloomFilter --------------------------------------------------------------------------------------
202202
203203template <typename ItemType, size_t bits_per_item, bool branchless,
204- typename HashFamily = TwoIndependentMultiplyShift ,
204+ typename HashFamily = SimpleMixSplit ,
205205 int k = (int )((double )bits_per_item * 0.693147180559945 + 0.5 )>
206206class CountingBloomFilter {
207207
@@ -221,7 +221,7 @@ class CountingBloomFilter {
221221 }
222222 ~CountingBloomFilter () { delete[] data; }
223223 Status Add (const ItemType &item);
224- Status AddAll (const vector<ItemType> data, const size_t start, const size_t end);
224+ Status AddAll (const vector<ItemType>& data, const size_t start, const size_t end);
225225 Status Remove (const ItemType &item);
226226 Status Contain (const ItemType &item) const ;
227227 size_t SizeInBytes () const { return arrayLength * 8 ; }
@@ -255,7 +255,7 @@ void CountingBloomFilter<ItemType, bits_per_item, branchless, HashFamily, k>::
255255template <typename ItemType, size_t bits_per_item, bool branchless,
256256 typename HashFamily, int k>
257257Status CountingBloomFilter<ItemType, bits_per_item, branchless, HashFamily, k>::
258- AddAll (const vector<ItemType> keys, const size_t start, const size_t end) {
258+ AddAll (const vector<ItemType>& keys, const size_t start, const size_t end) {
259259 int blocks = 1 + arrayLength / blockLen;
260260 uint32_t *tmp = new uint32_t [blocks * blockLen];
261261 int *tmpLen = new int [blocks]();
@@ -323,7 +323,7 @@ Status CountingBloomFilter<ItemType, bits_per_item, branchless, HashFamily, k>::
323323// #define VERIFY_COUNT
324324
325325template <typename ItemType, size_t bits_per_item, bool branchless,
326- typename HashFamily = TwoIndependentMultiplyShift ,
326+ typename HashFamily = SimpleMixSplit ,
327327 int k = (int )((double )bits_per_item * 0.693147180559945 + 0.5 )>
328328class SuccinctCountingBloomFilter {
329329
@@ -363,7 +363,7 @@ class SuccinctCountingBloomFilter {
363363 }
364364 ~SuccinctCountingBloomFilter () { delete[] data; delete[] counts; delete[] overflow; }
365365 Status Add (const ItemType &item);
366- Status AddAll (const vector<ItemType> data, const size_t start, const size_t end);
366+ Status AddAll (const vector<ItemType>& data, const size_t start, const size_t end);
367367 Status Remove (const ItemType &item);
368368 Status Contain (const ItemType &item) const ;
369369 size_t SizeInBytes () const { return arrayLength * 8 * 2 + overflowLength * 8 ; }
@@ -413,7 +413,7 @@ Status SuccinctCountingBloomFilter<ItemType, bits_per_item, branchless, HashFami
413413template <typename ItemType, size_t bits_per_item, bool branchless,
414414 typename HashFamily, int k>
415415Status SuccinctCountingBloomFilter<ItemType, bits_per_item, branchless, HashFamily, k>::
416- AddAll (const vector<ItemType> keys, const size_t start, const size_t end) {
416+ AddAll (const vector<ItemType>& keys, const size_t start, const size_t end) {
417417 int blocks = 1 + arrayLength / blockLen;
418418 uint32_t *tmp = new uint32_t [blocks * blockLen];
419419 int *tmpLen = new int [blocks]();
@@ -968,15 +968,11 @@ void SuccinctCountingBlockedBloomRankFilter<ItemType, bits_per_item, HashFamily,
968968 Increment (bucket_start + ((a >> 0 ) & 7 ), (a >> 3 ) & 0x3f );
969969 Increment (bucket_start + ((a >> 9 ) & 7 ), (a >> 12 ) & 0x3f );
970970 Increment (bucket_start + ((a >> 18 ) & 7 ), (a >> 21 ) & 0x3f );
971- // data[bucket_start + ((a >> 0) & 7)] |= 1ULL << ((a >> 3) & 0x3f);
972- // data[bucket_start + ((a >> 9) & 7)] |= 1ULL << ((a >> 12) & 0x3f);
973- // data[bucket_start + ((a >> 18) & 7)] |= 1ULL << ((a >> 21) & 0x3f);
974971 }
975972 uint32_t b = (uint32_t )(hash >> 32 );
976973 for (int i = 3 ; i < k; i++) {
977974 a += b;
978975 Increment (bucket_start + (a & 7 ), (a >> 3 ) & 0x3f );
979- // data[bucket_start + (a & 7)] |= 1ULL << ((a >> 3) & 0x3f);
980976 }
981977}
982978
@@ -1046,7 +1042,6 @@ void SuccinctCountingBlockedBloomRankFilter<ItemType, bits_per_item, HashFamily,
10461042 c = (left << 1 ) | right;
10471043 if (insertAt >= 64 || (c & 0x8000000000000000L ) != 0 ) {
10481044 // an overflow entry, or overflowing now
1049- // int index = allocateOverflow();
10501045 int index = nextFreeOverflow;
10511046 nextFreeOverflow = (int ) overflow[index];
10521047 for (int i = 0 ; i < 8 ; i++) {
0 commit comments