gem5
|
#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... | |
Public Member Functions inherited from Serializable | |
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 Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
Static Public Attributes inherited from Serializable | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
void Random::init | ( | uint32_t | s | ) |
Definition at line 68 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 83 of file random.hh.
References Stats::dist, and gen.
Referenced by Check::Check(), RandomRepl::findVictim(), GarnetSyntheticTraffic::generatePkt(), DramGen::genStartAddr(), SimpleMemory::getLatency(), LinearGen::getNextPacket(), RandomGen::getNextPacket(), DramGen::getNextPacket(), CheckTable::getRandomCheck(), Check::initiate(), SeriesRequestGenerator::initiate(), Check::initiateAction(), Check::initiateCheck(), Check::initiateFlush(), Check::initiatePrefetch(), LTAGE::loopUpdate(), LinearGen::nextPacketTick(), RandomGen::nextPacketTick(), PerfectSwitch::operateMessageBuffer(), StridePrefetcher::pcTableVictim(), Check::pickInitiatingNode(), Check::pickValue(), random_time(), EtherSwitch::Interface::switchingDelay(), GarnetSyntheticTraffic::tick(), MemTest::tick(), DefaultFetch< Impl >::tick(), TrafficGen::transition(), EtherLink::Link::transmit(), DistEtherLink::TxLink::transmit(), and LTAGE::update().
|
inline |
Definition at line 92 of file random.hh.
References Stats::dist, and gen.
|
inline |
Definition at line 101 of file random.hh.
References Stats::dist, and gen.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 74 of file random.cc.
References gen, panic, and paramOut().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 86 of file random.cc.
References gen, optParamIn(), and panic.
|
private |
Definition at line 67 of file random.hh.
Referenced by init(), random(), serialize(), and unserialize().