diff options
author | Daniel Schemmel <daniel@schemmel.net> | 2023-03-23 21:42:46 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-04-20 19:50:07 +0100 |
commit | 46ea4a471f105ac24537706f021459de5b740319 (patch) | |
tree | 51ffb44a0545377f3219c59129aa7c9a81342863 /include | |
parent | adfca64fdbcfd75d42b7a069d27ddbb0228e9eff (diff) | |
download | klee-46ea4a471f105ac24537706f021459de5b740319.tar.gz |
use `std::mt19937` instead of the custom implementation
Diffstat (limited to 'include')
-rw-r--r-- | include/klee/ADT/RNG.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/include/klee/ADT/RNG.h b/include/klee/ADT/RNG.h index 1c8eed15..fc08e3b8 100644 --- a/include/klee/ADT/RNG.h +++ b/include/klee/ADT/RNG.h @@ -10,26 +10,12 @@ #ifndef KLEE_RNG_H #define KLEE_RNG_H -namespace klee { - class RNG { - private: - /* Period parameters */ - static const int N = 624; - static const int M = 397; - static const unsigned int MATRIX_A = 0x9908b0dfUL; /* constant vector a */ - static const unsigned int UPPER_MASK = 0x80000000UL; /* most significant w-r bits */ - static const unsigned int LOWER_MASK = 0x7fffffffUL; /* least significant r bits */ - - private: - unsigned int mt[N]; /* the array for the state vector */ - int mti; +#include <random> - public: +namespace klee { + struct RNG : std::mt19937 { RNG(); - explicit RNG(unsigned int seed); - - /* set seed value */ - void seed(unsigned int seed); + explicit RNG(RNG::result_type seed); /* generates a random number on [0,0xffffffff]-interval */ unsigned int getInt32(); |