32#include "params/BloomFilterPerfect.hh"
43 fatal_if(
p.size != 1,
"The perfect Bloom filter cannot be limited to a "
45 fatal_if(
p.num_bits != 1,
"The perfect Bloom filter tracks entries "
46 "perfectly using an unlimited amount of 1-bit entries.");
47 fatal_if(
p.threshold != 1,
"The perfect Bloom filter uses 1-bit entries; "
48 "thus, their thresholds must be 1.");
64 auto* cast_other =
static_cast<const Perfect*
>(other);
65 entries.insert(cast_other->entries.begin(), cast_other->entries.end());
A perfect bloom filter with no false positives nor false negatives.
void unset(Addr addr) override
Perform the filter specific function to clear the corresponding entries (can be multiple) of an addre...
Perfect(const BloomFilterPerfectParams &p)
void clear() override
Clear the filter by resetting all values.
void merge(const Base *other) override
Merges the contents of both filters into this' (Bloom Filter union).
std::unordered_set< Addr > entries
Container storing all set (seen) entries.
int getTotalCount() const override
Get the total value stored in the filter entries.
void set(Addr addr) override
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
int getCount(Addr addr) const override
Get the value stored in the corresponding filter entry of an address.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
static SimObject * find(const char *name)
Find the SimObject with the given name and return a pointer to it.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.