Skip to content
Snippets Groups Projects

Adding Noise module parameter that will allow the designer to specify a seed in order to re-run with the same RNG, also initializing the RNG with a tsc based seed by default. Updating some language around seeding the noise part.

1 file
+ 1
7
Compare changes
  • Side-by-side
  • Inline
@@ -39,13 +39,7 @@ sub printFrontEndVars {
my ($i) = @_;
print ::OUT "static double \L$::xpartName[$i];\n";
if ($printed) { return; }
if ($::noiseGeneratorSeed != 0) {
print ::OUT "static unsigned long noise_seed = " . $::noiseGeneratorSeed . "LL;\n";
}
else {
print ::OUT "static unsigned long noise_seed = 0LL;\n";
}
print ::OUT "static unsigned long noise_seed = " . $::noiseGeneratorSeed . "ULL;\n";
print ::OUT << "END";
static unsigned long noise_u = 0, noise_v = 0, noise_w = 0;
Loading