base_set_assoc.hh (11055:54071fd5c397) | base_set_assoc.hh (11168:f98eb2da15a4) |
---|---|
1/* 2 * Copyright (c) 2012-2014 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 393 unchanged lines hidden (view full) --- 402 * The visitor should be a function (or object that behaves like a 403 * function) that takes a cache block reference as its parameter 404 * and returns a bool. A visitor can request the traversal to be 405 * stopped by returning false, returning true causes it to be 406 * called for the next block in the tag store. 407 * 408 * \param visitor Visitor to call on each block. 409 */ | 1/* 2 * Copyright (c) 2012-2014 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 393 unchanged lines hidden (view full) --- 402 * The visitor should be a function (or object that behaves like a 403 * function) that takes a cache block reference as its parameter 404 * and returns a bool. A visitor can request the traversal to be 405 * stopped by returning false, returning true causes it to be 406 * called for the next block in the tag store. 407 * 408 * \param visitor Visitor to call on each block. 409 */ |
410 void forEachBlk(CacheBlkVisitor &visitor) M5_ATTR_OVERRIDE { | 410 void forEachBlk(CacheBlkVisitor &visitor) override { |
411 for (unsigned i = 0; i < numSets * assoc; ++i) { 412 if (!visitor(blks[i])) 413 return; 414 } 415 } 416}; 417 418#endif // __MEM_CACHE_TAGS_BASESETASSOC_HH__ | 411 for (unsigned i = 0; i < numSets * assoc; ++i) { 412 if (!visitor(blks[i])) 413 return; 414 } 415 } 416}; 417 418#endif // __MEM_CACHE_TAGS_BASESETASSOC_HH__ |