]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/table/bloom_block.h
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
9 #include "util/dynamic_bloom.h"
14 class BloomBlockBuilder
{
16 static const std::string kBloomBlock
;
18 explicit BloomBlockBuilder(uint32_t num_probes
= 6) : bloom_(num_probes
) {}
20 void SetTotalBits(Allocator
* allocator
, uint32_t total_bits
,
21 uint32_t locality
, size_t huge_page_tlb_size
,
23 bloom_
.SetTotalBits(allocator
, total_bits
, locality
, huge_page_tlb_size
,
27 uint32_t GetNumBlocks() const { return bloom_
.GetNumBlocks(); }
29 void AddKeysHashes(const std::vector
<uint32_t>& keys_hashes
);
37 }; // namespace rocksdb