Commit c1c9b4d1 authored by Georg Kunz's avatar Georg Kunz

[master] simple fix for akaroa RNGs

Fixed compile error involving Akaroa due to changed RNG interfaces of
Horizon. However, Akaroa is not supported by Horizon.
parent a7f0470f
......@@ -44,6 +44,14 @@ void cAkaroaRNG::initialize(int runNumber, int rngId, int numRngs,
throw cRuntimeError("cAkaroaRNG: Akaroa supports only one RNG stream, use num-rngs=1 setting");
}
void initializeAsMaster(int runNumber, int rngId, int numRngs,
int parsimProcId, int parsimNumPartitions,
cConfiguration *cfg)
{
// just call initialize as Akaroa doesn't use manual seeding
initialize(runNumber, rngId, numRngs, parsimProcId, parsimNumPartitions, cfg);
}
void cAkaroaRNG::selfTest()
{
// Akaroa doesn't provide self-test capability
......@@ -87,5 +95,10 @@ double cAkaroaRNG::doubleRandIncl1()
return AkRandomReal();
}
void seed(unsigned long seed)
{
// Akaroa doesn't support manual seeding
}
#endif
......@@ -66,6 +66,14 @@ class ENVIR_API cAkaroaRNG : public cRNG
int parsimProcId, int parsimNumPartitions,
cConfiguration *cfg);
/**
* Called by the simulation framework to set up this RNG as the central
* seed generating RNG.
*/
virtual void initializeAsMaster(int runNumber, int rngId, int numRngs,
int parsimProcId, int parsimNumPartitions,
cConfiguration *cfg);
/** Tests correctness of the RNG */
virtual void selfTest();
......@@ -86,6 +94,9 @@ class ENVIR_API cAkaroaRNG : public cRNG
/** Invokes AkRandomReal(), so sadly, it actually cannot return either 0 or 1. */
virtual double doubleRandIncl1();
/** set seed without using initialize */
virtual void seed(unsigned long seed);
};
NAMESPACE_END
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment