Commit 6b1bf424 authored by Doak, Peter W.'s avatar Doak, Peter W.
Browse files

output the seeds used for each RNG in debug

parent 3d76fefd
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -37,7 +37,9 @@ public:
        seed_(detail::generateSeed(global_id_, seed)),
        engine_(seed_),
        distro_(0., 1.) {
#ifndef NDEBUG
    std::cout << "Generated Rng with global id: " << global_id_ << " and seed: " << seed_ << '\n';
#endif
  }

  // Make the random number generator object non-copyable, but move-constructible.
@@ -74,6 +76,7 @@ public:
  void discard(unsigned long long num_discard) {
    engine_.discard(num_discard);
  }

private:
  static int counter_;

@@ -93,8 +96,8 @@ int StdRandomWrapper<Engine>::counter_ = 0;
template <typename UIntType, UIntType a, UIntType c, UIntType m>
class StdRandomWrapper<std::linear_congruential_engine<UIntType, a, c, m>>;

}  // random
}  // math
}  // dca
}  // namespace random
}  // namespace math
}  // namespace dca

#endif  // DCA_MATH_RANDOM_STD_RANDOM_WRAPPER_HPP