brrip_rp.cc (12684:44ebd2bc020f) | brrip_rp.cc (12727:56c23b54bcb1) |
---|---|
1/** 2 * Copyright (c) 2018 Inria 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Daniel Carvalho 29 */ 30 31#include "mem/cache/replacement_policies/brrip_rp.hh" 32 | 1/** 2 * Copyright (c) 2018 Inria 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Daniel Carvalho 29 */ 30 31#include "mem/cache/replacement_policies/brrip_rp.hh" 32 |
33#include <cassert> |
|
33#include <memory> 34 35#include "base/logging.hh" // For fatal_if 36#include "base/random.hh" | 34#include <memory> 35 36#include "base/logging.hh" // For fatal_if 37#include "base/random.hh" |
38#include "params/BRRIPRP.hh" |
|
37 38BRRIPRP::BRRIPRP(const Params *p) 39 : BaseReplacementPolicy(p), 40 maxRRPV(p->max_RRPV), hitPriority(p->hit_priority), btp(p->btp) 41{ 42 fatal_if(maxRRPV <= 0, "max_RRPV should be greater than zero.\n"); 43} 44 --- 99 unchanged lines hidden --- | 39 40BRRIPRP::BRRIPRP(const Params *p) 41 : BaseReplacementPolicy(p), 42 maxRRPV(p->max_RRPV), hitPriority(p->hit_priority), btp(p->btp) 43{ 44 fatal_if(maxRRPV <= 0, "max_RRPV should be greater than zero.\n"); 45} 46 --- 99 unchanged lines hidden --- |