![]() |
alpaka
Abstraction Library for Parallel Kernel Acceleration
|
Contains some (constexpr-)constants for random bit integer to floating point conversion – which improve readability. More...
#include <UniformReal.hpp>
Static Public Attributes | |
| static constexpr T_Floating | halfBinWidth = normalizedIntervalBin / T_Floating{2} |
| this expression has been used by nvidia curand to respect the lower bounds criteria -> it essentially shifts the distribution to the bin center (on the upper bounds this shift is mitigated due to rounding – meaning 1 is not exceeded) | |
| static constexpr T_Floating | normalizedIntervalBin = T_Floating{1} / static_cast<T_Floating>(std::numeric_limits<T_Integer>::max()) |
| represents one bucket when converting an integer numbers to a floating point type in the range [0,1] | |
| static constexpr T_Floating | normalizedOpenIntervalBin = prevOne<T_Floating>() / static_cast<T_Floating>(std::numeric_limits<T_Integer>::max()) |
| uses a slightly smaller bucket size [0,std::nextafter(1,0)] / MAX to enforce the (open-) upper bounds criteria | |
Contains some (constexpr-)constants for random bit integer to floating point conversion – which improve readability.
Definition at line 36 of file UniformReal.hpp.
|
staticconstexpr |
this expression has been used by nvidia curand to respect the lower bounds criteria -> it essentially shifts the distribution to the bin center (on the upper bounds this shift is mitigated due to rounding – meaning 1 is not exceeded)
Definition at line 44 of file UniformReal.hpp.
|
staticconstexpr |
represents one bucket when converting an integer numbers to a floating point type in the range [0,1]
Definition at line 39 of file UniformReal.hpp.
|
staticconstexpr |
uses a slightly smaller bucket size [0,std::nextafter(1,0)] / MAX to enforce the (open-) upper bounds criteria
Definition at line 47 of file UniformReal.hpp.