Public Types |
typedef mt19937 | Engine |
typedef
uniform_real_distribution
< double > | Distribution |
Public Member Functions |
int | Initialize (int a_nbThreads) |
| Instanciate a number of RNG according to the number of threads used in openMP.
|
int | Initialize (int64_t a_seed, int a_nbThreads) |
double | GenerateRdmNber () |
| Generate a random number for the thread whose index is recovered from the ompenMP function.
|
double | GenerateNonThreadedRdmNber () |
| Generate a random number using the not thread safe random generator, for use in sequential parts of an otherwise multithreaded code.
|
Engine * | GetNonThreadedGenerator () |
| Get the not thread safe random generator, for use in sequential parts of an otherwise multithreaded code.
|
void | SetVerbose (int a_verboseLevel) |
| Set verbosity level.
|
Static Public Member Functions |
static sRNG * | GetInstance () |
| Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
|
Private Member Functions |
| sRNG () |
| Constructor of sRNG. Do nothing by default as it is a singleton clasee.
|
| ~sRNG () |
| Destructor of sRNG. Do nothing by default.
|
| sRNG (sRNG const &) |
void | operator= (sRNG const &) |
Private Attributes |
int | m_verbose |
vector< Engine > | mp_Engines |
Engine * | mp_NonThreadedEngine |
Distribution | mp_Distribution |
Static Private Attributes |
static sRNG * | mp_Instance = NULL |
Singleton class that generate a thread-safe random generator number for openMP
As singleton, it can be called from any class requiring RNGs.
Definition at line 23 of file sRNG.hh.