OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
RNGStream Class Reference

#include <RNGStream.h>

Collaboration diagram for RNGStream:
Collaboration graph
[legend]

Public Member Functions

std::mt19937_64 & getGenerator ()
 
template<class DISTR >
DISTR::result_type getNext (DISTR &RNGDist)
 

Static Public Member Functions

static RNGStreamgetInstance ()
 
static RNGStreamgetInstance (unsigned int seed)
 
static void deleteInstance (RNGStream *&generator)
 
static void setGlobalSeed (unsigned int seed)
 
static unsigned int getGlobalSeed ()
 

Private Member Functions

 RNGStream ()
 
 RNGStream (unsigned int seed)
 
 ~RNGStream ()
 

Private Attributes

std::mt19937_64 RNGenerator_m
 
bool isGlobal_m
 

Static Private Attributes

static RNGStreamglobalInstance_sm = NULL
 
static unsigned int globalSeed_sm = 42
 
static unsigned int numGlobalInstances_sm = 0
 

Detailed Description

Definition at line 6 of file RNGStream.h.

Constructor & Destructor Documentation

RNGStream::RNGStream ( )
inlineprivate

Definition at line 25 of file RNGStream.h.

Referenced by getInstance().

RNGStream::RNGStream ( unsigned int  seed)
inlineprivate

Definition at line 30 of file RNGStream.h.

RNGStream::~RNGStream ( )
inlineprivate

Definition at line 35 of file RNGStream.h.

Member Function Documentation

void RNGStream::deleteInstance ( RNGStream *&  generator)
static
std::mt19937_64 & RNGStream::getGenerator ( )

Definition at line 47 of file RNGStream.cpp.

References RNGenerator_m.

unsigned int RNGStream::getGlobalSeed ( )
static

Definition at line 43 of file RNGStream.cpp.

References globalSeed_sm.

RNGStream * RNGStream::getInstance ( )
static

Definition at line 9 of file RNGStream.cpp.

References globalInstance_sm, numGlobalInstances_sm, and RNGStream().

Referenced by Normal::allocate(), Uniform< size_t >::allocate(), and LatinHyperCube::allocate().

Here is the call graph for this function:

RNGStream * RNGStream::getInstance ( unsigned int  seed)
static

Definition at line 17 of file RNGStream.cpp.

References RNGStream().

Here is the call graph for this function:

template<class DISTR >
DISTR::result_type RNGStream::getNext ( DISTR &  RNGDist)
inline
void RNGStream::setGlobalSeed ( unsigned int  seed)
static

Definition at line 36 of file RNGStream.cpp.

References globalInstance_sm, globalSeed_sm, RNGenerator_m, and Options::seed.

Referenced by SampleCmd::execute().

Member Data Documentation

RNGStream * RNGStream::globalInstance_sm = NULL
staticprivate

Definition at line 38 of file RNGStream.h.

Referenced by getInstance(), and setGlobalSeed().

unsigned int RNGStream::globalSeed_sm = 42
staticprivate

Definition at line 39 of file RNGStream.h.

Referenced by getGlobalSeed(), and setGlobalSeed().

bool RNGStream::isGlobal_m
private

Definition at line 42 of file RNGStream.h.

Referenced by deleteInstance().

unsigned int RNGStream::numGlobalInstances_sm = 0
staticprivate

Definition at line 40 of file RNGStream.h.

Referenced by deleteInstance(), and getInstance().

std::mt19937_64 RNGStream::RNGenerator_m
private

Definition at line 41 of file RNGStream.h.

Referenced by getGenerator(), getNext(), and setGlobalSeed().


The documentation for this class was generated from the following files: