![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Used to sample floating-point values from a normal(-/gaussian) distribution. More...
#include <NormalReal.hpp>
Public Types | |
| using | result_type = T_Result |
Public Member Functions | |
| constexpr | NormalReal (T_Result mean=T_Result{0}, T_Result stdDev=T_Result{1}) |
| Constructs normal(-/gaussian) distribution with given parameters. | |
| template<concepts::UniformStdEngine T_Engine> | |
| constexpr result_type | operator() (T_Engine &engine) |
| Selects a value from a normal (-/gaussian) distribution for the configured (mean,stdDev) settings. | |
Used to sample floating-point values from a normal(-/gaussian) distribution.
Usage is analogous to std::normal_distribution<T_Result>
Definition at line 73 of file NormalReal.hpp.
| using alpaka::rand::distribution::NormalReal< T_Result >::result_type = T_Result |
Definition at line 75 of file NormalReal.hpp.
|
inlineexplicitconstexpr |
Constructs normal(-/gaussian) distribution with given parameters.
| mean | Mean of the target normal distribution. |
| stdDev | Standard deviation of the target normal distribution. |
The default is N(0,1). The distribution is sampled using the Box-Muller method. This implementation keeps an internal state, therefore each thread/worker must use its own instance to avoid data races when the same object is accessed concurrently by multiple workers.
Usage is otherwise analogous to std::normal_distribution<T_Result>
Definition at line 92 of file NormalReal.hpp.
|
inlineconstexpr |
Selects a value from a normal (-/gaussian) distribution for the configured (mean,stdDev) settings.
| engine | a random engine conforming to the UniformRandomEngine concept (currently accepts stdlib uniform engines and alpaka engines included in the alpaka::rand::engine namespace) |
Definition at line 105 of file NormalReal.hpp.