![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Select a floating-point value from a uniform interval. More...
#include <UniformReal.hpp>
Public Types | |
| using | Base = internal::UniformRealBase<T_Result, T_Interval> |
Public Member Functions | |
| constexpr | UniformReal (T_Interval interval=T_Interval{}) |
| constexpr | UniformReal (T_Result min, T_Result max, T_Interval interval=T_Interval{}) |
| template<concepts::UniformRandomEngine T_Engine> | |
| constexpr auto | operator() (T_Engine &engine) const -> T_Result |
| Selects a value from a uniform distribution over the configured (min, max) interval, respecting the specified interval bounds. | |
Static Public Member Functions | |
| template<std::integral T_Value> | |
| static consteval void | checkValueConformity () |
Select a floating-point value from a uniform interval.
This generator produces floating-point values of type T_Result drawn from a uniform interval [a, b) or (a, b], depending on the interval type specified via Interval_v: default case is CO ->[a,b). The interface mirrors std::uniform_real_distribution, and can be invoked with any engine adhering to the 'UniformRandomEngine' concept, which includes std uniform engines.
Supported result types: float, double Supported engine result widths: 32-bit and 64-bit unsigned integers.
Definition at line 258 of file UniformReal.hpp.
| using alpaka::rand::distribution::UniformReal< T_Result, T_Interval >::Base = internal::UniformRealBase<T_Result, T_Interval> |
Definition at line 269 of file UniformReal.hpp.
|
inlineexplicitconstexpr |
Definition at line 271 of file UniformReal.hpp.
|
inlineconstexpr |
Definition at line 275 of file UniformReal.hpp.
|
inlinestaticconsteval |
Definition at line 263 of file UniformReal.hpp.
|
inlineconstexpr |
Selects a value from a uniform distribution over the configured (min, max) interval, respecting the specified interval bounds.
**
Input: a random engine conforming to the UniformRandomEngine concept (currently accepts stdlib uniform engines and alpaka engines included in the alpaka::rand::engine namespace) Output: a floating-point value sampled from the configured distribution.
Definition at line 296 of file UniformReal.hpp.