Class Rng represents a pseudo random number generator that can be called by both the CPU and the GPU. Uses std::default_random_engine and std::uniform_real_distribution for the CPU side, and thrust::default_random_engine and thrust::uniform_real_distribution on the GPU side.
More...
#include <rng.h>
|
MSL_USERFUNC | Rng () |
| Default constructor.
|
|
MSL_USERFUNC | Rng (float minVal, float maxVal) |
| Creates a pseudo random number generator with minimum value minVal and maximum value maxVal. More...
|
|
MSL_USERFUNC | Rng (float minVal, float maxVal, size_t seed) |
| Creates a pseudo random number generator with minimum value minVal and maximum value maxVal and sets a new seed seed. More...
|
|
MSL_USERFUNC float | operator() () |
|
Class Rng represents a pseudo random number generator that can be called by both the CPU and the GPU. Uses std::default_random_engine and std::uniform_real_distribution for the CPU side, and thrust::default_random_engine and thrust::uniform_real_distribution on the GPU side.
MSL_USERFUNC msl::Rng::Rng |
( |
float |
minVal, |
|
|
float |
maxVal |
|
) |
| |
|
inline |
Creates a pseudo random number generator with minimum value minVal and maximum value maxVal.
- Parameters
-
minVal | The minimum value. |
maxVal | The maximum value. |
MSL_USERFUNC msl::Rng::Rng |
( |
float |
minVal, |
|
|
float |
maxVal, |
|
|
size_t |
seed |
|
) |
| |
|
inline |
Creates a pseudo random number generator with minimum value minVal and maximum value maxVal and sets a new seed seed.
- Parameters
-
minVal | The minimum value. |
maxVal | The maximum value. |
seed | The new seed. |
MSL_USERFUNC float msl::Rng::operator() |
( |
| ) |
|
|
inline |
Returns the next pseudo random number.
- Returns
- The next pseudo random number.
The documentation for this class was generated from the following file: