diff --git a/src/base/random.cc b/src/base/random.cc index 0315b6e6e6..e861767c1e 100644 --- a/src/base/random.cc +++ b/src/base/random.cc @@ -42,9 +42,6 @@ #include -#include "base/logging.hh" -#include "sim/serialize.hh" - namespace gem5 { @@ -69,33 +66,6 @@ Random::init(uint32_t s) gen.seed(s); } -void -Random::serialize(CheckpointOut &cp) const -{ - panic("Currently not used anywhere.\n"); - - // get the state from the generator - std::ostringstream oss; - oss << gen; - std::string state = oss.str(); - paramOut(cp, "mt_state", state); -} - -void -Random::unserialize(CheckpointIn &cp) -{ - panic("Currently not used anywhere.\n"); - - // the random generator state did not use to be part of the - // checkpoint state, so be forgiving in the unserialization and - // keep on going if the parameter is not there - std::string state; - if (optParamIn(cp, "mt_state", state)) { - std::istringstream iss(state); - iss >> gen; - } -} - Random random_mt; } // namespace gem5 diff --git a/src/base/random.hh b/src/base/random.hh index 5e6cf23f90..bc692411bd 100644 --- a/src/base/random.hh +++ b/src/base/random.hh @@ -51,14 +51,11 @@ #include "base/compiler.hh" #include "base/types.hh" -#include "sim/serialize.hh" namespace gem5 { -class Checkpoint; - -class Random : public Serializable +class Random { public: @@ -115,9 +112,6 @@ class Random : public Serializable std::uniform_int_distribution dist(min, max); return dist(gen); } - - void serialize(CheckpointOut &cp) const override; - void unserialize(CheckpointIn &cp) override; }; /**