71 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__ 72 #define __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__ 80 struct TreePLRURPParams;
142 std::shared_ptr<PLRUTree>
tree;
173 void invalidate(
const std::shared_ptr<ReplacementData>& replacement_data)
182 void touch(
const std::shared_ptr<ReplacementData>& replacement_data)
const 191 void reset(
const std::shared_ptr<ReplacementData>& replacement_data)
const 217 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_TREE_PLRU_RP_HH__ uint64_t count
Count of the number of sharers of a replacement data.
TreePLRUReplData(const uint64_t index, std::shared_ptr< PLRUTree > tree)
Default constructor.
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
const uint64_t numLeaves
Number of leaves that share a single replacement data.
PLRUTree * treeInstance
Holds the latest temporary tree instance created by instantiateEntry().
A common base class of cache replacement policy objects.
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Copyright (c) 2018 Inria All rights reserved.
TreePLRURPParams Params
Convenience typedef.
TreePLRURP(const Params *p)
Construct and initiliaze this replacement policy.
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Tree-PLRU-specific implementation of replacement data.
std::vector< bool > PLRUTree
Instead of implementing the tree itself with pointers, it is implemented as an array of bits...
std::shared_ptr< PLRUTree > tree
Shared tree pointer.
const uint64_t index
Theoretical index of this replacement data in the tree.
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using TreePLRU bits.
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.