gem5
v20.1.0.0
|
#include <random.hh>
Public Member Functions | |
~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... | |
Random () | |
Random (uint32_t s) | |
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 () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
void Random::init | ( | uint32_t | s | ) |
Definition at line 64 of file random.cc.
References gen, and ArmISA::s.
Referenced by DistIface::init(), pybind_init_core(), and Random().
|
inline |
Definition at line 98 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 70 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 82 of file random.cc.
References gen, optParamIn(), and panic.
|
private |
Definition at line 63 of file random.hh.
Referenced by init(), random(), serialize(), and unserialize().