diff options
author | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
commit | 141f61d83a23096dcff20df704bdd734c520f535 (patch) | |
tree | ee2383d721a039bb056bd6442a7241aa305d187e /src/mem/ruby/filters/BlockBloomFilter.cc | |
parent | f1c3f3044b73d890ffdfdd113b3b37ae2809d21b (diff) | |
download | gem5-141f61d83a23096dcff20df704bdd734c520f535.tar.xz |
ruby: get rid of gems_common/util.hh and .cc and use stuff in src/base
Diffstat (limited to 'src/mem/ruby/filters/BlockBloomFilter.cc')
-rw-r--r-- | src/mem/ruby/filters/BlockBloomFilter.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mem/ruby/filters/BlockBloomFilter.cc b/src/mem/ruby/filters/BlockBloomFilter.cc index 21d7921c6..875a0d015 100644 --- a/src/mem/ruby/filters/BlockBloomFilter.cc +++ b/src/mem/ruby/filters/BlockBloomFilter.cc @@ -26,6 +26,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "base/intmath.hh" +#include "base/str.hh" #include "mem/gems_common/Map.hh" #include "mem/ruby/common/Address.hh" #include "mem/ruby/filters/BlockBloomFilter.hh" @@ -34,11 +36,17 @@ using namespace std; BlockBloomFilter::BlockBloomFilter(string str) { - string tail(str); - string head = string_split(tail, '_'); + string head, tail; + +#ifndef NDEBUG + bool success = +#endif + split_first(str, head, tail, '_'); + + assert(success); m_filter_size = atoi(head.c_str()); - m_filter_size_bits = log_int(m_filter_size); + m_filter_size_bits = floorLog2(m_filter_size); m_filter.setSize(m_filter_size); |