Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::rng::XORWow Class Reference

#include <XORWow.h>

Inheritance diagram for lm::rng::XORWow:
[legend]
Collaboration diagram for lm::rng::XORWow:
[legend]

Public Member Functions

 XORWow (int cudaDevice, uint32_t seedTop, uint32_t seedBottom, Distributions availableDists)
virtual ~XORWow ()
virtual uint32_t getRandom ()
 Get a random integer.
virtual double getRandomDouble ()
 Get a random double.
virtual double getExpRandomDouble ()
 Get a random exponentially distributed double.
virtual double getNormRandomDouble ()
 Get a random normally distributed double.
virtual void getRandomDoubles (double *rngs, int numberRNGs)
 Get a number of random doubles.
virtual void getExpRandomDoubles (double *rngs, int numberRNGs)
 Get a number of random exponentially distiributed doubles.
virtual void getNormRandomDoubles (double *rngs, int numberRNGs)
 Get a number of random normally distributed doubles.
Public Member Functions inherited from lm::rng::RandomGenerator
 RandomGenerator (uint32_t seedTop, uint32_t seedBottom, Distributions availableDists=(Distributions)(ALL))
virtual ~RandomGenerator ()
virtual uint64_t getSeed ()
 Get the current seed.

Protected Member Functions

virtual void generateRandomValues ()
virtual void launchGenerateKernel ()

Protected Attributes

int cudaDevice
curandState * state
cudaStream_t stream
float * randomValues
float * nextRandomValues
float * randomValuesDev
float * expRandomValues
float * nextExpRandomValues
float * expRandomValuesDev
float * normRandomValues
float * nextNormRandomValues
float * normRandomValuesDev
const size_t numberValues
size_t nextValue
Protected Attributes inherited from lm::rng::RandomGenerator
uint64_t seed
Distributions availableDists

Additional Inherited Members

Public Types inherited from lm::rng::RandomGenerator
enum  Distributions {
  NONE = 0x00 , UNIFORM = 0x01 , EXPONENTIAL = 0x02 , NORMAL = 0x04 ,
  ALL = 0xFF
}
 Types of random number generators that are allowed. More...

Constructor & Destructor Documentation

◆ XORWow()

lm::rng::XORWow::XORWow ( int cudaDevice,
uint32_t seedTop,
uint32_t seedBottom,
Distributions availableDists )

◆ ~XORWow()

virtual lm::rng::XORWow::~XORWow ( )
virtual

Member Function Documentation

◆ generateRandomValues()

virtual void lm::rng::XORWow::generateRandomValues ( )
protectedvirtual

◆ getExpRandomDouble()

virtual double lm::rng::XORWow::getExpRandomDouble ( )
virtual

Get a random exponentially distributed double.

Returns
random A random double

Implements lm::rng::RandomGenerator.

◆ getExpRandomDoubles()

virtual void lm::rng::XORWow::getExpRandomDoubles ( double * rngs,
int numberRNGs )
virtual

Get a number of random exponentially distiributed doubles.

Parameters
rngsA preallocated array for random numbers
numberRNGsNumber or randoms to put in array

Reimplemented from lm::rng::RandomGenerator.

◆ getNormRandomDouble()

virtual double lm::rng::XORWow::getNormRandomDouble ( )
virtual

Get a random normally distributed double.

Returns
random A random double

Implements lm::rng::RandomGenerator.

◆ getNormRandomDoubles()

virtual void lm::rng::XORWow::getNormRandomDoubles ( double * rngs,
int numberRNGs )
virtual

Get a number of random normally distributed doubles.

Parameters
rngsA preallocated array for random numbers
numberRNGsNumber or randoms to put in array

Reimplemented from lm::rng::RandomGenerator.

◆ getRandom()

virtual uint32_t lm::rng::XORWow::getRandom ( )
virtual

Get a random integer.

Returns
random A random integer

Implements lm::rng::RandomGenerator.

◆ getRandomDouble()

virtual double lm::rng::XORWow::getRandomDouble ( )
virtual

Get a random double.

Returns
random A random double

Implements lm::rng::RandomGenerator.

◆ getRandomDoubles()

virtual void lm::rng::XORWow::getRandomDoubles ( double * rngs,
int numberRNGs )
virtual

Get a number of random doubles.

Parameters
rngsA preallocated array for random numbers
numberRNGsNumber or randoms to put in array

Reimplemented from lm::rng::RandomGenerator.

◆ launchGenerateKernel()

virtual void lm::rng::XORWow::launchGenerateKernel ( )
protectedvirtual

Member Data Documentation

◆ cudaDevice

int lm::rng::XORWow::cudaDevice
protected

◆ expRandomValues

float* lm::rng::XORWow::expRandomValues
protected

◆ expRandomValuesDev

float* lm::rng::XORWow::expRandomValuesDev
protected

◆ nextExpRandomValues

float* lm::rng::XORWow::nextExpRandomValues
protected

◆ nextNormRandomValues

float* lm::rng::XORWow::nextNormRandomValues
protected

◆ nextRandomValues

float* lm::rng::XORWow::nextRandomValues
protected

◆ nextValue

size_t lm::rng::XORWow::nextValue
protected

◆ normRandomValues

float* lm::rng::XORWow::normRandomValues
protected

◆ normRandomValuesDev

float* lm::rng::XORWow::normRandomValuesDev
protected

◆ numberValues

const size_t lm::rng::XORWow::numberValues
protected

◆ randomValues

float* lm::rng::XORWow::randomValues
protected

◆ randomValuesDev

float* lm::rng::XORWow::randomValuesDev
protected

◆ state

curandState* lm::rng::XORWow::state
protected

◆ stream

cudaStream_t lm::rng::XORWow::stream
protected

The documentation for this class was generated from the following file:
  • /data2/LM_zls_github/Lattice-Microbes/src/rng/XORWow.h