|
OPENRAND_DEVICE | Squares (uint32_t seed, uint32_t ctr, uint32_t global_seed=openrand::DEFAULT_GLOBAL_SEED) |
| Construct a new Squares generator. More...
|
|
template<typename T = uint32_t> |
OPENRAND_DEVICE T | draw () |
|
Public Member Functions inherited from openrand::BaseRNG< Squares > |
OPENRAND_DEVICE result_type | operator() () |
| Generates a 32 bit unsigned integer from a uniform distribution. More...
|
|
OPENRAND_DEVICE T | rand () |
| Generates a random number from a uniform distribution between 0 and 1. More...
|
|
OPENRAND_DEVICE T | uniform (const T low, const T high) |
| Generates a number from a uniform distribution between a and b. More...
|
|
OPENRAND_DEVICE void | fill_random (T *array, const int N) |
|
OPENRAND_DEVICE T | randn () |
| Generates a random number from a normal distribution with mean 0 and std 1. More...
|
|
OPENRAND_DEVICE T | randn (const T mean, const T std_dev) |
| Generates a random number from a normal distribution with mean and std. More...
|
|
OPENRAND_DEVICE vec2< T > | randn2 () |
| More efficient version of randn, returns two values at once. More...
|
|
OPENRAND_DEVICE T | range (const T N) |
| Generates a random integer of certain range. More...
|
|
OPENRAND_DEVICE T | gamma (T alpha, T b) |
| Generates a random number from a gamma distribution with shape alpha and scale b. More...
|
|
std::enable_if_t< has_counter< T >::value, Squares > | forward_state (int n) const |
| Returns a new generator with the internal state forwarded by a given number. More...
|
|
◆ Squares()
OPENRAND_DEVICE openrand::Squares::Squares |
( |
uint32_t |
seed, |
|
|
uint32_t |
ctr, |
|
|
uint32_t |
global_seed = openrand::DEFAULT_GLOBAL_SEED |
|
) |
| |
|
inline |
Construct a new Squares generator.
- Parameters
-
seed | The seed for the generator. |
_ctr | The counter for the generator. |
global_seed | Optional. The global seed. |
- Note
- Unlike other generators, Squares supports 32-bit seed for now. This is due to the hashing function that ensures the seed bits has certain properties as outlined by the author in https://arxiv.org/abs/2004.06278.
The documentation for this class was generated from the following file:
- /home/runner/work/OpenRAND/OpenRAND/include/openrand/squares.h