Remove unnecessary redefinition of new random functions. Enable rand logging for the generators returned by deterministicRandom().
This commit is contained in:
parent
5f55f3f613
commit
acb2fc67ac
|
@ -40,12 +40,12 @@ IRandom* deterministicRandom() {
|
||||||
if(!deterministicRandomSeed) {
|
if(!deterministicRandomSeed) {
|
||||||
static thread_local IRandom* preseedRandom = nullptr;
|
static thread_local IRandom* preseedRandom = nullptr;
|
||||||
if(!preseedRandom) {
|
if(!preseedRandom) {
|
||||||
preseedRandom = new DeterministicRandom(1);
|
preseedRandom = new DeterministicRandom(1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return preseedRandom;
|
return preseedRandom;
|
||||||
}
|
}
|
||||||
random = new DeterministicRandom(deterministicRandomSeed);
|
random = new DeterministicRandom(deterministicRandomSeed, true);
|
||||||
}
|
}
|
||||||
return random;
|
return random;
|
||||||
}
|
}
|
||||||
|
|
|
@ -878,9 +878,5 @@ inline Future<Void> delayJittered(double seconds, int taskID = TaskDefaultDelay)
|
||||||
inline Future<Void> yield(int taskID = TaskDefaultYield) { return g_network->yield(taskID); }
|
inline Future<Void> yield(int taskID = TaskDefaultYield) { return g_network->yield(taskID); }
|
||||||
inline bool check_yield(int taskID = TaskDefaultYield) { return g_network->check_yield(taskID); }
|
inline bool check_yield(int taskID = TaskDefaultYield) { return g_network->check_yield(taskID); }
|
||||||
|
|
||||||
void setRandomSeed();
|
|
||||||
IRandom* deterministicRandom();
|
|
||||||
IRandom* nondeterministicRandom();
|
|
||||||
|
|
||||||
#include "flow/genericactors.actor.h"
|
#include "flow/genericactors.actor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue