Skip to content
Snippets Groups Projects
Commit 3e422a42 authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

UL type so using UL

parent 9c4ac3c5
No related branches found
No related tags found
3 merge requests!439RCG 5.0 release fro deb 10,!350Merge branch 'branch-4.2' into master-branch-4.2-merge,!349Adding 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.
......@@ -39,7 +39,7 @@ sub printFrontEndVars {
my ($i) = @_;
print ::OUT "static double \L$::xpartName[$i];\n";
if ($printed) { return; }
print ::OUT "static unsigned long noise_seed = " . $::noiseGeneratorSeed . "ULL;\n";
print ::OUT "static unsigned long noise_seed = " . $::noiseGeneratorSeed . "UL;\n";
print ::OUT << "END";
static unsigned long noise_u = 0, noise_v = 0, noise_w = 0;
......@@ -89,7 +89,7 @@ sub frontEndInitCode {
$calcExp .= "if (noise_seed == 0) {\n";
$calcExp .= " rdtscl(noise_seed);\n";
$calcExp .= " rdtscl(noise_w);\n";
$calcExp .= " noise_seed |= (noise_w << 32ULL);\n";
$calcExp .= " noise_seed |= (noise_w << 32UL);\n";
$calcExp .= "}\n";
$calcExp .= "noise_set_seed(noise_seed);\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment