projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
140785d
)
bugfix: since pow() causes a bug don't use it
author
Nathan Binkert
<nate@binkert.org>
Fri, 12 Mar 2010 23:11:09 +0000
(15:11 -0800)
committer
Nathan Binkert
<nate@binkert.org>
Fri, 12 Mar 2010 23:11:09 +0000
(15:11 -0800)
It's a power of two anyway, so why use it in the first place.
src/mem/ruby/system/PseudoLRUPolicy.hh
patch
|
blob
|
history
diff --git
a/src/mem/ruby/system/PseudoLRUPolicy.hh
b/src/mem/ruby/system/PseudoLRUPolicy.hh
index fbbe5191ab5a4df99d2ee8ad52da1c1bb3913aaf..0cdf8a118ab90cfb8316c80118aeb5218debf2d1 100644
(file)
--- a/
src/mem/ruby/system/PseudoLRUPolicy.hh
+++ b/
src/mem/ruby/system/PseudoLRUPolicy.hh
@@
-2,8
+2,6
@@
#ifndef PSEUDOLRUPOLICY_H
#define PSEUDOLRUPOLICY_H
-#include <cmath>
-
#include "mem/ruby/system/AbstractReplacementPolicy.hh"
/**
@@
-57,7
+55,7
@@
PseudoLRUPolicy::PseudoLRUPolicy(Index num_sets, Index assoc)
m_num_levels++;
}
assert(m_num_levels < sizeof(unsigned int)*4);
- num_tree_nodes = (
(int)pow(2, m_num_levels))-
1;
+ num_tree_nodes = (
1 << m_num_levels) -
1;
m_trees = new uint64[m_num_sets];
for(unsigned int i=0; i< m_num_sets; i++){
m_trees[i] = 0;