#ifndef __MEM_RUBY_FILTERS_ABSTRACTBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_ABSTRACTBLOOMFILTER_HH__
-#include <iostream>
-
#include "mem/ruby/common/Address.hh"
class AbstractBloomFilter
virtual int getCount(Addr addr) = 0;
virtual int getTotalCount() = 0;
- virtual void print(std::ostream& out) const = 0;
-
virtual int getIndex(Addr addr) = 0;
virtual int readBit(const int index) = 0;
virtual void writeBit(const int index, const int value) = 0;
#include "mem/ruby/filters/BlockBloomFilter.hh"
#include "base/intmath.hh"
-#include "base/str.hh"
#include "mem/ruby/system/RubySystem.hh"
-using namespace std;
-
BlockBloomFilter::BlockBloomFilter(int size)
{
m_filter_size = size;
return get_index(addr);
}
-void
-BlockBloomFilter::print(ostream& out) const
-{
-}
-
int
BlockBloomFilter::readBit(const int index)
{
#ifndef __MEM_RUBY_FILTERS_BLOCKBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_BLOCKBLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
int readBit(const int index);
void writeBit(const int index, const int value);
- void print(std::ostream& out) const;
-
private:
int get_index(Addr addr);
#include <cassert>
#include "base/intmath.hh"
-#include "base/str.hh"
#include "mem/ruby/system/RubySystem.hh"
-using namespace std;
-
BulkBloomFilter::BulkBloomFilter(int size)
{
m_filter_size = size;
// TODO
}
-void
-BulkBloomFilter::print(ostream& out) const
-{
-}
-
int
BulkBloomFilter::get_index(Addr addr)
{
#ifndef __MEM_RUBY_FILTERS_BULKBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_BULKBLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
int readBit(const int index);
void writeBit(const int index, const int value);
- void print(std::ostream& out) const;
-
private:
int get_index(Addr addr);
Addr permute(Addr addr);
#include "mem/ruby/filters/H3BloomFilter.hh"
#include "base/intmath.hh"
-#include "base/logging.hh"
-
-using namespace std;
static int H3[64][16] = {
{ 33268410, 395488709, 311024285, 456111753,
return count;
}
-void
-H3BloomFilter::print(ostream& out) const
-{
-}
-
int
H3BloomFilter::get_index(Addr addr, int i)
{
#ifndef __MEM_RUBY_FILTERS_H3BLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_H3BLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
bool isSet(Addr addr);
int getCount(Addr addr);
int getTotalCount();
- void print(std::ostream& out) const;
int getIndex(Addr addr);
int readBit(const int index);
#include "base/intmath.hh"
#include "mem/ruby/system/RubySystem.hh"
-using namespace std;
-
LSB_CountingBloomFilter::LSB_CountingBloomFilter(int head, int tail)
{
m_filter_size = head;
return get_index(addr);
}
-void
-LSB_CountingBloomFilter::print(ostream& out) const
-{
-}
-
int
LSB_CountingBloomFilter::readBit(const int index)
{
#ifndef __MEM_RUBY_FILTERS_LSB_COUNTINGBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_LSB_COUNTINGBLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
int readBit(const int index);
void writeBit(const int index, const int value);
- void print(std::ostream& out) const;
-
private:
int get_index(Addr addr);
#include <vector>
#include "base/intmath.hh"
-#include "base/logging.hh"
-
-using namespace std;
MultiBitSelBloomFilter::MultiBitSelBloomFilter(std::size_t filter_size,
int num_hashes, int skip_bits, bool is_parallel)
return count;
}
-void
-MultiBitSelBloomFilter::print(ostream& out) const
-{
-}
-
int
MultiBitSelBloomFilter::get_index(Addr addr, int i)
{
#ifndef __MEM_RUBY_FILTERS_MULTIBITSELBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_MULTIBITSELBLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
bool isSet(Addr addr);
int getCount(Addr addr);
int getTotalCount();
- void print(std::ostream& out) const;
int getIndex(Addr addr);
int readBit(const int index);
#include "mem/ruby/filters/MultiGrainBloomFilter.hh"
#include "base/intmath.hh"
-#include "base/str.hh"
#include "mem/ruby/system/RubySystem.hh"
-using namespace std;
-
MultiGrainBloomFilter::MultiGrainBloomFilter(int head, int tail)
{
// head contains size of 1st bloom filter, tail contains size of
// TODO
}
-void
-MultiGrainBloomFilter::print(ostream& out) const
-{
-}
-
int
MultiGrainBloomFilter::get_block_index(Addr addr)
{
#ifndef __MEM_RUBY_FILTERS_MULTIGRAINBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_MULTIGRAINBLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
int readBit(const int index);
void writeBit(const int index, const int value);
- void print(std::ostream& out) const;
-
private:
int get_block_index(Addr addr);
int get_page_index(Addr addr);
#include "base/str.hh"
#include "mem/ruby/system/RubySystem.hh"
-using namespace std;
-
NonCountingBloomFilter::NonCountingBloomFilter(int head, int tail)
{
// head contains filter size, tail contains bit offset from block number
return count;
}
-void
-NonCountingBloomFilter::print(ostream& out) const
-{
-}
-
int
NonCountingBloomFilter::getIndex(Addr addr)
{
#ifndef __MEM_RUBY_FILTERS_NONCOUNTINGBLOOMFILTER_HH__
#define __MEM_RUBY_FILTERS_NONCOUNTINGBLOOMFILTER_HH__
-#include <iostream>
#include <vector>
#include "mem/ruby/common/Address.hh"
int readBit(const int index);
void writeBit(const int index, const int value);
- void print(std::ostream& out) const;
-
int
operator[](const int index) const
{