7unsigned long long *next_random;
10extern "C" void randReset() {
12 (
unsigned long long *)calloc(workThreads,
sizeof(
unsigned long long));
13 for (INT i = 0; i < workThreads; i++)
14 next_random[i] = rand();
19unsigned long long randd(INT
id) {
20 next_random[id] = next_random[id] * (
unsigned long long)(25214903917) + 11;
21 return next_random[id];
25INT rand_max(INT
id, INT x) {
26 INT res = randd(
id) % x;
33INT rand(INT a, INT b) {
return (rand() % (b - a)) + a; }