Line | Count | Source |
1 | #include <random> | |
2 | #include <cstdint> | |
3 | ||
4 | std::mt19937* mt_rand = NULL; | |
5 | ||
6 | 3.74k | extern "C" void fuzz_mt19937_init(uint32_t seed) { |
7 | 3.74k | mt_rand = new std::mt19937(seed); |
8 | 3.74k | } |
9 | ||
10 | 3.12M | extern "C" uint32_t fuzz_mt19937_get(void) { |
11 | 3.12M | return (*mt_rand)(); |
12 | 3.12M | } |
13 | ||
14 | 3.75k | extern "C" void fuzz_mt19937_destroy(void) { |
15 | 3.75k | delete mt_rand; |
16 | 3.75k | mt_rand = NULL; |
17 | 3.75k | } |