30#ifndef __BASE_FILTERS_BASE_HH__
31#define __BASE_FILTERS_BASE_HH__
39#include "params/BloomFilterBase.hh"
67 Base(
const BloomFilterBaseParams &
p)
81 for (
auto& entry :
filter) {
147 for (
const auto& entry :
filter) {
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Abstract superclass for simulation objects.
virtual bool isSet(Addr addr) const
Check if the corresponding filter entries of an address should be considered as set.
std::vector< SatCounter8 > filter
The filter itself.
const int setThreshold
Threshold at which a filter entry starts being considered as set.
virtual void unset(Addr addr)
Perform the filter specific function to clear the corresponding entries (can be multiple) of an addre...
virtual int getTotalCount() const
Get the total value stored in the filter entries.
virtual void clear()
Clear the filter by resetting all values.
const int sizeBits
Number of bits needed to represent the size of the filter.
const unsigned offsetBits
Number of LSB bits to ignore from the the addresses.
virtual void set(Addr addr)=0
Perform the filter specific function to set the corresponding entries (can be multiple) of an address...
Base(const BloomFilterBaseParams &p)
Create and clear the filter.
virtual int getCount(Addr addr) const
Get the value stored in the corresponding filter entry of an address.
virtual void merge(const Base *other)
Merges the contents of both filters into this' (Bloom Filter union).
static constexpr std::enable_if_t< std::is_integral_v< T >, int > floorLog2(T x)
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.