alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::rand::engine::PhiloxConstants< TParams > Class Template Reference

#include <PhiloxConstants.hpp>

+ Inheritance diagram for alpaka::rand::engine::PhiloxConstants< TParams >:

Static Public Member Functions

static constexpr std::uint32_t MULTIPLITER_4x32_0 ()
 First Philox S-box multiplier. More...
 
static constexpr std::uint32_t MULTIPLITER_4x32_1 ()
 Second Philox S-box multiplier. More...
 
static constexpr std::uint32_t WEYL_32_0 ()
 1st Weyl sequence parameter, 32 bits More...
 
static constexpr std::uint32_t WEYL_32_1 ()
 2nd Weyl sequence parameter, 32 bits More...
 
static constexpr std::uint64_t WEYL_64_0 ()
 First Weyl sequence parameter: the golden ratio. More...
 
static constexpr std::uint64_t WEYL_64_1 ()
 Second Weyl sequence parameter: $ \sqrt{3}-1 $. More...
 

Detailed Description

template<typename TParams>
class alpaka::rand::engine::PhiloxConstants< TParams >

Constants used in the Philox algorithm

The numbers are taken from the reference Philox implementation:

J. K. Salmon, M. A. Moraes, R. O. Dror and D. E. Shaw, "Parallel random numbers: As easy as 1, 2, 3," SC '11: Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis, 2011, pp. 1-12, doi: 10.1145/2063384.2063405.

Template Parameters
TParamsbasic Philox algorithm parameters

static const data members are transformed into functions, because GCC assumes types with static data members to be not mappable and makes not exception for constexpr ones. This is a valid interpretation of the OpenMP <= 4.5 standard. In OpenMP >= 5.0 types with any kind of static data member are mappable.

Definition at line 31 of file PhiloxConstants.hpp.

Member Function Documentation

◆ MULTIPLITER_4x32_0()

template<typename TParams >
static constexpr std::uint32_t alpaka::rand::engine::PhiloxConstants< TParams >::MULTIPLITER_4x32_0 ( )
inlinestaticconstexpr

First Philox S-box multiplier.

Definition at line 59 of file PhiloxConstants.hpp.

◆ MULTIPLITER_4x32_1()

template<typename TParams >
static constexpr std::uint32_t alpaka::rand::engine::PhiloxConstants< TParams >::MULTIPLITER_4x32_1 ( )
inlinestaticconstexpr

Second Philox S-box multiplier.

Definition at line 65 of file PhiloxConstants.hpp.

◆ WEYL_32_0()

template<typename TParams >
static constexpr std::uint32_t alpaka::rand::engine::PhiloxConstants< TParams >::WEYL_32_0 ( )
inlinestaticconstexpr

1st Weyl sequence parameter, 32 bits

Definition at line 47 of file PhiloxConstants.hpp.

◆ WEYL_32_1()

template<typename TParams >
static constexpr std::uint32_t alpaka::rand::engine::PhiloxConstants< TParams >::WEYL_32_1 ( )
inlinestaticconstexpr

2nd Weyl sequence parameter, 32 bits

Definition at line 53 of file PhiloxConstants.hpp.

◆ WEYL_64_0()

template<typename TParams >
static constexpr std::uint64_t alpaka::rand::engine::PhiloxConstants< TParams >::WEYL_64_0 ( )
inlinestaticconstexpr

First Weyl sequence parameter: the golden ratio.

Definition at line 35 of file PhiloxConstants.hpp.

◆ WEYL_64_1()

template<typename TParams >
static constexpr std::uint64_t alpaka::rand::engine::PhiloxConstants< TParams >::WEYL_64_1 ( )
inlinestaticconstexpr

Second Weyl sequence parameter: $ \sqrt{3}-1 $.

Definition at line 41 of file PhiloxConstants.hpp.


The documentation for this class was generated from the following file: