2
0

mt19937.cpp 321 B

1234567891011121314151617
  1. #include <random>
  2. #include <cstdint>
  3. std::mt19937* mt_rand = NULL;
  4. extern "C" void fuzz_mt19937_init(uint32_t seed) {
  5. mt_rand = new std::mt19937(seed);
  6. }
  7. extern "C" uint32_t fuzz_mt19937_get(void) {
  8. return (*mt_rand)();
  9. }
  10. extern "C" void fuzz_mt19937_destroy(void) {
  11. delete mt_rand;
  12. mt_rand = NULL;
  13. }