Go to the documentation of this file.
33 #include "params/BloomFilterMulti.hh"
38 :
Base(
p), filters(
p->filters)
49 for (
auto& sub_filter :
filters) {
57 auto* cast_other =
static_cast<const Multi*
>(other);
58 assert(
filters.size() == cast_other->filters.size());
60 filters[
i]->merge(cast_other->filters[
i]);
67 for (
auto& sub_filter :
filters) {
68 sub_filter->set(
addr);
75 for (
auto& sub_filter :
filters) {
76 sub_filter->unset(
addr);
84 for (
const auto& sub_filter :
filters) {
85 if (sub_filter->isSet(
addr)) {
96 for (
const auto& sub_filter :
filters) {
106 for (
const auto& sub_filter :
filters) {
107 count += sub_filter->getTotalCount();
115 BloomFilterMultiParams::create()
void clear() override
Clear the filter by resetting all values.
void unset(Addr addr) override
Perform the filter specific function to clear the corresponding entries (can be multiple) of an addre...
Multi(const BloomFilterMultiParams *p)
void set(Addr addr) override
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
bool isSet(Addr addr) const override
Check if the corresponding filter entries of an address should be considered as set.
std::vector< Base * > filters
Sub-filters used by this filter.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const int setThreshold
Threshold at which a filter entry starts being considered as set.
int getTotalCount() const override
Get the total value stored in the filter entries.
void merge(const Base *other) override
Merges the contents of both filters into this' (Bloom Filter union).
This BloomFilter has multiple sub-filters, each with its own hashing functionality.
int getCount(Addr addr) const override
Get the value stored in the corresponding filter entry of an address.
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17