gem5 v24.0.0.0
|
#include <random.hh>
Public Member Functions | |
~Random () | |
void | init (uint32_t s) |
template<typename T > | |
std::enable_if_t< std::is_integral_v< T >, T > | random () |
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating point. | |
template<typename T > | |
std::enable_if_t< std::is_floating_point_v< T >, T > | random () |
template<typename T > | |
std::enable_if_t< std::is_integral_v< T >, T > | random (T min, T max) |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
Random () | |
Random (uint32_t s) | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
std::mt19937_64 | gen |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
void gem5::Random::init | ( | uint32_t | s | ) |
Definition at line 67 of file random.cc.
References gen, and gem5::ArmISA::s.
Referenced by gem5::DistIface::init(), gem5::ProtocolTester::ProtocolTester(), and gem5::pybind_init_core().
|
inline |
Definition at line 102 of file random.hh.
References gem5::statistics::dist, and gen.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 73 of file random.cc.
References gen, panic, gem5::paramOut(), and state.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 85 of file random.cc.
References gen, gem5::ArmISA::iss, gem5::optParamIn(), panic, and state.