36 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_WEIGHTED_LRU_RP_HH__ 37 #define __MEM_CACHE_REPLACEMENT_POLICIES_WEIGHTED_LRU_RP_HH__ 44 struct WeightedLRURPParams;
62 last_occ_ptr(0), last_touch_tick(0) {}
75 void invalidate(
const std::shared_ptr<ReplacementData>& replacement_data)
83 void touch(
const std::shared_ptr<ReplacementData>&
84 replacement_data)
const override;
85 void touch(
const std::shared_ptr<ReplacementData>& replacement_data,
94 void reset(
const std::shared_ptr<ReplacementData>& replacement_data)
const 111 candidates)
const override;
114 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_WEIGHTED_LRU_RP_HH__ WeightedLRUReplData()
Default constructor.
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
A common base class of cache replacement policy objects.
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
WeightedLRURPParams Params
Copyright (c) 2018 Inria All rights reserved.
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using weight.
WeightedLRUPolicy(const Params *p)
uint64_t Tick
Tick count type.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
Tick last_touch_tick
Tick on which the entry was last touched.
int last_occ_ptr
pointer for last occupancy
Weighted LRU implementation of replacement data.
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.