gem5  v20.0.0.3
lfu_rp.hh
Go to the documentation of this file.
1 
37 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
38 #define __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
39 
41 
42 struct LFURPParams;
43 
45 {
46  protected:
49  {
51  unsigned refCount;
52 
56  LFUReplData() : refCount(0) {}
57  };
58 
59  public:
61  typedef LFURPParams Params;
62 
66  LFURP(const Params *p);
67 
71  ~LFURP() {}
72 
79  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
80  const override;
81 
88  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
89  override;
90 
97  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
98  override;
99 
106  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
107  override;
108 
114  std::shared_ptr<ReplacementData> instantiateEntry() override;
115 };
116 
117 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
LFURP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: lfu_rp.cc:36
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: lfu_rp.cc:50
LFURPParams Params
Convenience typedef.
Definition: lfu_rp.hh:61
Definition: lfu_rp.hh:44
A common base class of cache replacement policy objects.
Definition: base.hh:46
STL vector class.
Definition: stl.hh:37
Copyright (c) 2018 Inria All rights reserved.
LFU-specific implementation of replacement data.
Definition: lfu_rp.hh:48
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: lfu_rp.cc:57
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using reference frequency.
Definition: lfu_rp.cc:64
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: lfu_rp.cc:85
LFUReplData()
Default constructor.
Definition: lfu_rp.hh:56
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
~LFURP()
Destructor.
Definition: lfu_rp.hh:71
Bitfield< 0 > p
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition: lfu_rp.cc:42
unsigned refCount
Number of references to this entry since it was reset.
Definition: lfu_rp.hh:51

Generated on Fri Jul 3 2020 15:53:03 for gem5 by doxygen 1.8.13