MCKL
Monte Carlo Kernel Library
Classes | Namespaces | Macros
philox_generic_2x.hpp File Reference
#include <mckl/random/internal/common.hpp>
#include <mckl/random/internal/philox_common.hpp>
#include <mckl/random/internal/philox_constants.hpp>
#include <mckl/random/increment.hpp>

Go to the source code of this file.

Classes

class  mckl::internal::Philox2x64GeneratorGenericImpl< T, Constants >
 
class  mckl::internal::Philox2xGeneratorGenericImpl< T, Constants >
 

Namespaces

 mckl
 
 mckl::internal
 

Macros

#define MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(N)
 
#define MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_ROUND_10
 

Macro Definition Documentation

◆ MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX

#define MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX (   N)
Value:
{ \
constexpr T w0 = Constants::weyl::value[0] * static_cast<T>(N - 1); \
constexpr T m0 = Constants::multiplier::value[0]; \
\
t1 = s1; \
s1 = PhiloxHiLo<T>::eval(s0, m0, t0); \
s0 = (k0 + w0) ^ (t1 ^ t0); \
}

Definition at line 40 of file philox_generic_2x.hpp.

◆ MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_ROUND_10

#define MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_ROUND_10
Value:
T k0 = std::get<0>(key); \
T s0 = std::get<0>(buf.s); \
T s1 = std::get<1>(buf.s); \
T t0; \
T t1; \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x1) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x2) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x3) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x4) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x5) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x6) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x7) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x8) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0x9) \
MCKL_RANDOM_INTERNAL_PHILOX_GENERIC_2X_RBOX(0xA) \
std::get<0>(buf.s) = s0; \
std::get<1>(buf.s) = s1;

Definition at line 50 of file philox_generic_2x.hpp.