alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::rand Namespace Reference

Namespaces

 distribution
 The random number generator distribution specifics.
 
 engine
 The random number generator engine specifics.
 

Classes

struct  ConceptRand
 
struct  EngineCallHostAccProxy
 
class  MersenneTwister
 The standard library mersenne twister implementation. More...
 
class  Philox4x32x10
 
class  Philox4x32x10Vector
 
class  PhiloxStateless4x32x10Vector
 
class  RandDefault
 
class  RandomDevice
 The standard library rand device implementation. More...
 
class  RandUniformCudaHipRand
 The CUDA/HIP rand implementation. More...
 
class  TinyMersenneTwister
 "Tiny" state mersenne twister implementation More...
 
class  UniformReal
 TEMP: Distributions to be decided on later. The generator should be compatible with STL as of now. More...
 

Typedefs

using RandStdLib = TinyMersenneTwister
 

Functions

constexpr ALPAKA_FN_HOST_ACC auto high32Bits (std::uint64_t const x) -> std::uint32_t
 Get high 32 bits of a 64-bit number. More...
 
constexpr ALPAKA_FN_HOST_ACC auto low32Bits (std::uint64_t const x) -> std::uint32_t
 Get low 32 bits of a 64-bit number. More...
 
constexpr ALPAKA_FN_HOST_ACC void multiplyAndSplit64to32 (std::uint64_t const a, std::uint64_t const b, std::uint32_t &resultHigh, std::uint32_t &resultLow)
 

Typedef Documentation

◆ RandStdLib

Definition at line 23 of file RandStdLib.hpp.

Function Documentation

◆ high32Bits()

constexpr ALPAKA_FN_HOST_ACC auto alpaka::rand::high32Bits ( std::uint64_t const  x) -> std::uint32_t
inlineconstexpr

Get high 32 bits of a 64-bit number.

Definition at line 14 of file MultiplyAndSplit64to32.hpp.

◆ low32Bits()

constexpr ALPAKA_FN_HOST_ACC auto alpaka::rand::low32Bits ( std::uint64_t const  x) -> std::uint32_t
inlineconstexpr

Get low 32 bits of a 64-bit number.

Definition at line 20 of file MultiplyAndSplit64to32.hpp.

◆ multiplyAndSplit64to32()

constexpr ALPAKA_FN_HOST_ACC void alpaka::rand::multiplyAndSplit64to32 ( std::uint64_t const  a,
std::uint64_t const  b,
std::uint32_t &  resultHigh,
std::uint32_t &  resultLow 
)
inlineconstexpr

Multiply two 64-bit numbers and split the result into high and low 32 bits, also known as "mulhilo32"

Parameters
afirst 64-bit multiplier
bsecond 64-bit multiplier
resultHighhigh 32 bits of the product a*b
resultLowlow 32 bits of the product a*b

Definition at line 33 of file MultiplyAndSplit64to32.hpp.