MCKL
Monte Carlo Kernel Library
Classes | Typedefs | Functions

Random number generating using Intel RDRAND instructions. More...

Classes

class  mckl::RDRANDEngine< ResultType, NTrialMax >
 RDRAND generator. More...
 

Typedefs

using mckl::RDRAND16 = RDRANDEngine< std::uint16_t >
 RNG Engine using 16-bit RDRAND instruction. More...
 
using mckl::RDRAND32 = RDRANDEngine< std::uint32_t >
 RNG Engine using 32-bit RDRAND instruction. More...
 
using mckl::RDRAND64 = RDRANDEngine< std::uint64_t >
 RNG Engine using 64-bit RDRAND instruction. More...
 

Functions

template<typename UIntType , std::size_t W>
bool mckl::rdrand (UIntType *, std::integral_constant< int, W >)
 Invoke the RDRAND instruction and return the carry flag. More...
 
template<typename UIntType >
bool mckl::rdrand (UIntType *rand, std::integral_constant< int, 16 >)
 Invoke the 16-bit RDRAND instruction and return the carry flag. More...
 
template<typename UIntType >
bool mckl::rdrand (UIntType *rand, std::integral_constant< int, 32 >)
 Invoke the 32-bit RDRAND instruction and return the carry flag. More...
 
template<typename UIntType >
bool mckl::rdrand (UIntType *rand, std::integral_constant< int, 64 >)
 Invoke the 64-bit RDRAND instruction and return the carry flag. More...
 

Detailed Description

Random number generating using Intel RDRAND instructions.

Typedef Documentation

◆ RDRAND16

using mckl::RDRAND16 = typedef RDRANDEngine<std::uint16_t>

RNG Engine using 16-bit RDRAND instruction.

Definition at line 201 of file rdrand.hpp.

◆ RDRAND32

RNG Engine using 32-bit RDRAND instruction.

Definition at line 205 of file rdrand.hpp.

◆ RDRAND64

RNG Engine using 64-bit RDRAND instruction.

Definition at line 209 of file rdrand.hpp.

Function Documentation

◆ rdrand() [1/4]

template<typename UIntType , std::size_t W>
bool mckl::rdrand ( UIntType *  ,
std::integral_constant< int, W >   
)
inline

Invoke the RDRAND instruction and return the carry flag.

◆ rdrand() [2/4]

template<typename UIntType >
bool mckl::rdrand ( UIntType *  rand,
std::integral_constant< int, 16 >   
)
inline

Invoke the 16-bit RDRAND instruction and return the carry flag.

Definition at line 51 of file rdrand.hpp.

◆ rdrand() [3/4]

template<typename UIntType >
bool mckl::rdrand ( UIntType *  rand,
std::integral_constant< int, 32 >   
)
inline

Invoke the 32-bit RDRAND instruction and return the carry flag.

Definition at line 63 of file rdrand.hpp.

◆ rdrand() [4/4]

template<typename UIntType >
bool mckl::rdrand ( UIntType *  rand,
std::integral_constant< int, 64 >   
)
inline

Invoke the 64-bit RDRAND instruction and return the carry flag.

Definition at line 75 of file rdrand.hpp.