summaryrefslogtreecommitdiff
path: root/src/mem/ruby/structures/LRUPolicy.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/LRUPolicy.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/LRUPolicy.hh')
-rw-r--r--src/mem/ruby/structures/LRUPolicy.hh16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mem/ruby/structures/LRUPolicy.hh b/src/mem/ruby/structures/LRUPolicy.hh
index bb61b9d50..0d18e208d 100644
--- a/src/mem/ruby/structures/LRUPolicy.hh
+++ b/src/mem/ruby/structures/LRUPolicy.hh
@@ -36,15 +36,15 @@
class LRUPolicy : public AbstractReplacementPolicy
{
public:
- LRUPolicy(Index num_sets, Index assoc);
+ LRUPolicy(int64 num_sets, int64 assoc);
~LRUPolicy();
- 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;
};
inline
-LRUPolicy::LRUPolicy(Index num_sets, Index assoc)
+LRUPolicy::LRUPolicy(int64 num_sets, int64 assoc)
: AbstractReplacementPolicy(num_sets, assoc)
{
}
@@ -55,7 +55,7 @@ LRUPolicy::~LRUPolicy()
}
inline void
-LRUPolicy::touch(Index set, Index index, Tick time)
+LRUPolicy::touch(int64 set, int64 index, Tick time)
{
assert(index >= 0 && index < m_assoc);
assert(set >= 0 && set < m_num_sets);
@@ -63,12 +63,12 @@ LRUPolicy::touch(Index set, Index index, Tick time)
m_last_ref_ptr[set][index] = time;
}
-inline Index
-LRUPolicy::getVictim(Index set) const
+inline int64
+LRUPolicy::getVictim(int64 set) const
{
// assert(m_assoc != 0);
Tick time, smallest_time;
- Index smallest_index;
+ int64 smallest_index;
smallest_index = 0;
smallest_time = m_last_ref_ptr[set][0];