vSMC
vSMC: Scalable Monte Carlo
Classes | Namespaces | Macros | Typedefs
threefry.hpp File Reference
#include <vsmc/rng/internal/common.hpp>
#include <vsmc/rng/counter.hpp>

Go to the source code of this file.

Classes

class  vsmc::internal::ThreefryInitPar< T, K >
 
class  vsmc::internal::ThreefryInsertKey< T, K, N, bool >
 
class  vsmc::internal::ThreefryInsertKey< T, 2, N, true >
 
class  vsmc::internal::ThreefryInsertKey< T, 4, N, true >
 
class  vsmc::internal::ThreefryInsertKeyInc< T, Inc >
 
class  vsmc::internal::ThreefryInsertKeyInc< SIMD< T >, Inc >
 
class  vsmc::internal::ThreefryKSConstant< typename >
 
class  vsmc::internal::ThreefryKSConstant< SIMD< T > >
 
class  vsmc::internal::ThreefryKSConstant< std::uint32_t >
 
class  vsmc::internal::ThreefryKSConstant< std::uint64_t >
 
class  vsmc::internal::ThreefryRotate< T, K, N, bool >
 
class  vsmc::internal::ThreefryRotate< T, 2, N, true >
 
class  vsmc::internal::ThreefryRotate< T, 4, N, true >
 
class  vsmc::internal::ThreefryRotateBits< T >
 
class  vsmc::internal::ThreefryRotateBits< SIMD< T > >
 
class  vsmc::internal::ThreefryRotateConstant< typename, size_t, size_t, size_t >
 
class  vsmc::internal::ThreefryRotateConstant< SIMD< T >, K, N, I >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 0, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 1, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 2, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 3, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 4, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 5, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 6, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 2, 7, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 0, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 0, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 1, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 1, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 2, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 2, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 3, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 3, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 4, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 4, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 5, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 5, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 6, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 6, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 7, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint32_t, 4, 7, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 0, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 1, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 2, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 3, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 4, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 5, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 6, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 2, 7, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 0, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 0, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 1, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 1, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 2, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 2, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 3, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 3, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 4, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 4, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 5, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 5, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 6, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 6, 1 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 7, 0 >
 
class  vsmc::internal::ThreefryRotateConstant< std::uint64_t, 4, 7, 1 >
 
class  vsmc::internal::ThreefryRotateImpl< T, R >
 
class  vsmc::ThreefryGeneratorGeneric< ResultType, K, Rounds >
 Threefry RNG generator. More...
 

Namespaces

 vsmc
 
 vsmc::internal
 

Macros

#define VSMC_DEFINE_RNG_THREEFRY_ROTATE_CONSTANT(T, K, N, I, val)
 
#define VSMC_RNG_THREEFRY_ROUNDS   20
 ThreefryGenerator default rounds. More...
 
#define VSMC_RNG_THREEFRY_VECTOR_LENGTH   4
 ThreefryGenerator default vector length. More...
 
#define VSMC_STATIC_ASSERT_RNG_THREEFRY(SIMD)
 
#define VSMC_STATIC_ASSERT_RNG_THREEFRY_RESULT_TYPE(ResultType, SIMD)
 
#define VSMC_STATIC_ASSERT_RNG_THREEFRY_SIZE(K, SIMD)
 

Typedefs

using vsmc::Threefry = ThreefryEngine< std::uint32_t >
 The default 32-bits Threefry engine. More...
 
using vsmc::Threefry2x32 = ThreefryEngine< std::uint32_t, 2 >
 Threefry2x32 RNG engine. More...
 
using vsmc::Threefry2x64 = ThreefryEngine< std::uint64_t, 2 >
 Threefry2x64 RNG engine. More...
 
using vsmc::Threefry4x32 = ThreefryEngine< std::uint32_t, 4 >
 Threefry4x32 RNG engine. More...
 
using vsmc::Threefry4x64 = ThreefryEngine< std::uint64_t, 4 >
 Threefry4x64 RNG engine. More...
 
using vsmc::Threefry_64 = ThreefryEngine< std::uint64_t >
 The default 64-bits Threefry engine. More...
 
template<typename ResultType , std::size_t K = 4, std::size_t Rounds = 20>
using vsmc::ThreefryEngine = CounterEngine< ThreefryGeneratorGeneric< ResultType, K, Rounds >>
 Threefry RNG engine. More...
 

Macro Definition Documentation

#define VSMC_DEFINE_RNG_THREEFRY_ROTATE_CONSTANT (   T,
  K,
  N,
  I,
  val 
)
Value:
template <> \
class ThreefryRotateConstant<T, K, N, I> \
: public std::integral_constant<int, val> \
{ \
};

Definition at line 54 of file threefry.hpp.

#define VSMC_STATIC_ASSERT_RNG_THREEFRY (   SIMD)
Value:
VSMC_STATIC_ASSERT_RNG_THREEFRY_SIZE(K, SIMD);
#define VSMC_STATIC_ASSERT_RNG_THREEFRY_RESULT_TYPE(ResultType, SIMD)
Definition: threefry.hpp:38

Definition at line 50 of file threefry.hpp.

#define VSMC_STATIC_ASSERT_RNG_THREEFRY_RESULT_TYPE (   ResultType,
  SIMD 
)
Value:
VSMC_STATIC_ASSERT(((sizeof(ResultType) == sizeof(std::uint32_t) && \
std::is_unsigned<ResultType>::value) || \
(sizeof(ResultType) == sizeof(std::uint64_t) && \
std::is_unsigned<ResultType>::value)), \
"**ThreefryGenerator" #SIMD \
"** USED WITH ResultType OTHER THAN UNSIGNED 32/64 BITS INTEGER")
uint uint32_t
Definition: opencl.h:39
ulong uint64_t
Definition: opencl.h:40
#define VSMC_STATIC_ASSERT(cond, msg)
Definition: assert.hpp:42

Definition at line 38 of file threefry.hpp.

#define VSMC_STATIC_ASSERT_RNG_THREEFRY_SIZE (   K,
  SIMD 
)
Value:
VSMC_STATIC_ASSERT((K == 2 || K == 4), \
"**Threefry" #SIMD "** USED WITH SIZE OTHER THAN 2 OR 4")
#define VSMC_STATIC_ASSERT(cond, msg)
Definition: assert.hpp:42

Definition at line 46 of file threefry.hpp.