summaryrefslogtreecommitdiff
path: root/src/mem/ruby/structures/PseudoLRUPolicy.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:50 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:50 -0500
commit2cbe7c705be1cce44c5581fa58569cd95cc0f62d (patch)
treedf30549e0d7683b0f4c58039cd9c6247b54f7033 /src/mem/ruby/structures/PseudoLRUPolicy.hh
parent4ccdf8fb81ff670f111428c31b9741c926d87d20 (diff)
downloadgem5-2cbe7c705be1cce44c5581fa58569cd95cc0f62d.tar.xz
ruby: remove typedef of Index as int64
The Index type defined as typedef int64 does not really provide any help since in most places we use primitive types instead of Index. Also, the name Index is very generic that it does not merit being used as a typename.
Diffstat (limited to 'src/mem/ruby/structures/PseudoLRUPolicy.hh')
-rw-r--r--src/mem/ruby/structures/PseudoLRUPolicy.hh18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mem/ruby/structures/PseudoLRUPolicy.hh b/src/mem/ruby/structures/PseudoLRUPolicy.hh
index e464bbeac..8722728cf 100644
--- a/src/mem/ruby/structures/PseudoLRUPolicy.hh
+++ b/src/mem/ruby/structures/PseudoLRUPolicy.hh
@@ -47,11 +47,11 @@
class PseudoLRUPolicy : public AbstractReplacementPolicy
{
public:
- PseudoLRUPolicy(Index num_sets, Index assoc);
+ PseudoLRUPolicy(int64 num_sets, int64 assoc);
~PseudoLRUPolicy();
- void touch(Index set, Index way, Tick time);
- Index getVictim(Index set) const;
+ void touch(int64 set, int64 way, Tick time);
+ int64 getVictim(int64 set) const;
private:
unsigned int m_effective_assoc; /** nearest (to ceiling) power of 2 */
@@ -61,11 +61,11 @@ class PseudoLRUPolicy : public AbstractReplacementPolicy
};
inline
-PseudoLRUPolicy::PseudoLRUPolicy(Index num_sets, Index assoc)
+PseudoLRUPolicy::PseudoLRUPolicy(int64 num_sets, int64 assoc)
: AbstractReplacementPolicy(num_sets, assoc)
{
// associativity cannot exceed capacity of tree representation
- assert(num_sets > 0 && assoc > 1 && assoc <= (Index) sizeof(uint64)*4);
+ assert(num_sets > 0 && assoc > 1 && assoc <= sizeof(uint64)*4);
m_trees = NULL;
m_num_levels = 0;
@@ -96,7 +96,7 @@ PseudoLRUPolicy::~PseudoLRUPolicy()
}
inline void
-PseudoLRUPolicy::touch(Index set, Index index, Tick time)
+PseudoLRUPolicy::touch(int64 set, int64 index, Tick time)
{
assert(index >= 0 && index < m_assoc);
assert(set >= 0 && set < m_num_sets);
@@ -114,11 +114,11 @@ PseudoLRUPolicy::touch(Index set, Index index, Tick time)
m_last_ref_ptr[set][index] = time;
}
-inline Index
-PseudoLRUPolicy::getVictim(Index set) const
+inline int64
+PseudoLRUPolicy::getVictim(int64 set) const
{
// assert(m_assoc != 0);
- Index index = 0;
+ int64 index = 0;
int tree_index = 0;
int node_val;