2c2
< * Copyright (c) 2012-2014,2016-2017 ARM Limited
---
> * Copyright (c) 2012-2014,2016-2018 ARM Limited
52a53
> #include <functional>
180c181
< virtual void cleanupRefs() {}
---
> void cleanupRefs();
185c186
< virtual void computeStats() {}
---
> void computeStats();
190c191
< virtual std::string print() const = 0;
---
> std::string print();
292c293,328
< virtual void forEachBlk(CacheBlkVisitor &visitor) = 0;
---
>
> /**
> * Visit each block in the tags and apply a visitor
> *
> * The visitor should be a std::function that takes a cache block
> * reference as its parameter.
> *
> * @param visitor Visitor to call on each block.
> */
> virtual void forEachBlk(std::function<void(CacheBlk &)> visitor) = 0;
>
> /**
> * Find if any of the blocks satisfies a condition
> *
> * The visitor should be a std::function that takes a cache block
> * reference as its parameter. The visitor will terminate the
> * traversal early if the condition is satisfied.
> *
> * @param visitor Visitor to call on each block.
> */
> virtual bool anyBlk(std::function<bool(CacheBlk &)> visitor) = 0;
>
> private:
> /**
> * Update the reference stats using data from the input block
> *
> * @param blk The input block
> */
> void cleanupRefsVisitor(CacheBlk &blk);
>
> /**
> * Update the occupancy and age stats using data from the input block
> *
> * @param blk The input block
> */
> void computeStatsVisitor(CacheBlk &blk);