32 #ifndef VSMC_RNG_U01_HPP 33 #define VSMC_RNG_U01_HPP 38 #define VSMC_DEFINE_RNG_U01_IMPL( \ 39 UBits, FBits, RealType, Left, Right, left, right) \ 41 class U01Impl<sizeof(std::uint##UBits##_t), sizeof(RealType), Left, \ 45 template <typename UIntType> \ 46 static RealType eval(UIntType u) \ 48 return ::vsmc_u01_##left##_##right##_u##UBits##_f##FBits( \ 49 static_cast<uint##UBits##_t>(u)); \ 53 #define VSMC_DEFINE_RNG_U01(UBits, FBits, RealType) \ 54 VSMC_DEFINE_RNG_U01_IMPL( \ 55 UBits, FBits, RealType, Closed, Closed, closed, closed) \ 56 VSMC_DEFINE_RNG_U01_IMPL( \ 57 UBits, FBits, RealType, Closed, Open, closed, open) \ 58 VSMC_DEFINE_RNG_U01_IMPL( \ 59 UBits, FBits, RealType, Open, Closed, open, closed) \ 60 VSMC_DEFINE_RNG_U01_IMPL(UBits, FBits, RealType, Open, Open, open, open) 68 template <std::
size_t, std::
size_t,
typename,
typename>
78 template <typename UIntType, typename RealType, typename Left, typename Right>
80 : public internal::U01Impl<sizeof(UIntType), sizeof(RealType), Left, Right>
86 #endif // VSMC_RNG_U01_HPP
#define VSMC_DEFINE_RNG_U01(UBits, FBits, RealType)