MCPcopy Create free account
hub / github.com/apache/arrow / InsertHashImpl

Method InsertHashImpl

cpp/src/parquet/bloom_filter.cc:473–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471}
472
473void BlockSplitBloomFilter::InsertHashImpl(uint64_t hash) {
474 const uint32_t bucket_index = static_cast<uint32_t>(((hash >> 32) * NumBlocks()) >> 32);
475 const uint32_t key = static_cast<uint32_t>(hash);
476 uint32_t* bitset32 = reinterpret_cast<uint32_t*>(data_->mutable_data());
477
478 for (int i = 0; i < kBitsSetPerBlock; i++) {
479 // Calculate mask for key in the given bitset.
480 const uint32_t mask = UINT32_C(0x1) << ((key * SALT[i]) >> 27);
481 bitset32[bucket_index * kBitsSetPerBlock + i] |= mask;
482 }
483}
484
485void BlockSplitBloomFilter::InsertHash(uint64_t hash) { InsertHashImpl(hash); }
486

Callers

nothing calls this directly

Calls 2

NumBlocksFunction · 0.85
mutable_dataMethod · 0.45

Tested by

no test coverage detected