gem5
v20.0.0.3
|
#include <random.hh>
Public Member Functions | |
Random () | |
Random (uint32_t s) | |
~Random () | |
void | init (uint32_t s) |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, T >::type | random () |
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating point. More... | |
template<typename T > | |
std::enable_if< std::is_floating_point< T >::value, T >::type | random () |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, T >::type | random (T min, T max) |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
![]() | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Attributes | |
std::mt19937_64 | gen |
Additional Inherited Members | |
![]() | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
void Random::init | ( | uint32_t | s | ) |
Definition at line 64 of file random.cc.
References gen.
Referenced by DistIface::init(), pybind_init_core(), and Random().
|
inline |
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating point.
Definition at line 79 of file random.hh.
References Stats::dist, and type.
Referenced by MPP_TAGE::adjustAlloc(), TAGE_SC_L_TAGE::adjustAlloc(), RiscvProcess::argsInit(), TAGE_SC_L_TAGE::calcDep(), Check::Check(), Linux::devRandom(), GarnetSyntheticTraffic::generatePkt(), DramGen::genStartAddr(), SimpleMemory::getLatency(), RandomGen::getNextPacket(), LinearGen::getNextPacket(), DramGen::getNextPacket(), CheckTable::getRandomCheck(), RandomRP::getVictim(), TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), SeriesRequestGenerator::initiate(), Check::initiate(), Check::initiateAction(), Check::initiateCheck(), Check::initiateFlush(), Check::initiatePrefetch(), SimpleCache::insert(), LoopPredictor::loopUpdate(), RandomGen::nextPacketTick(), LinearGen::nextPacketTick(), TrafficGen::nextState(), PerfectSwitch::operateMessageBuffer(), MPP_LoopPredictor::optionalAgeInc(), TAGE_SC_L_LoopPredictor::optionalAgeInc(), SMMUTLB::pickEntryIdxToReplace(), ARMArchTLB::pickEntryIdxToReplace(), IPACache::pickEntryIdxToReplace(), ConfigCache::pickEntryIdxToReplace(), WalkCache::pickEntryIdxToReplace(), Check::pickInitiatingNode(), Check::pickValue(), random_time(), RandomStreamGen::randomPick(), BIPRP::reset(), BRRIPRP::reset(), EtherSwitch::Interface::switchingDelay(), GarnetSyntheticTraffic::tick(), MemTest::tick(), DefaultFetch< Impl >::tick(), MultiperspectivePerceptron::train(), EtherLink::Link::transmit(), DistEtherLink::TxLink::transmit(), LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), MultiperspectivePerceptronTAGE::update(), and MultiperspectivePerceptron::update().
|
inline |
Definition at line 88 of file random.hh.
References Stats::dist, and type.
|
inline |
Definition at line 97 of file random.hh.
References Stats::dist, random_mt, serialize(), and unserialize().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 70 of file random.cc.
References gen, panic, and paramOut().
Referenced by random().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 82 of file random.cc.
References gen, optParamIn(), and panic.
Referenced by random().
|
private |
Definition at line 63 of file random.hh.
Referenced by init(), serialize(), and unserialize().