alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::rand::engine::cpu::RandomDevice Class Reference

The standard library's random device based on the local entropy pool. More...

#include <RandStdLib.hpp>

Public Types

using result_type = std::random_device::result_type
 

Public Member Functions

 RandomDevice ()=default
 
ALPAKA_FN_HOST RandomDevice (std::uint32_t const &, std::uint32_t const &=0, std::uint32_t const &=0)
 
ALPAKA_FN_HOST auto operator() () -> result_type
 

Static Public Member Functions

static constexpr ALPAKA_FN_HOST auto max () -> result_type
 
static constexpr ALPAKA_FN_HOST auto min () -> result_type
 

Detailed Description

The standard library's random device based on the local entropy pool.

Warning: the entropy pool on many devices degrates quickly and performance will drop significantly when this point occures.

size of state: 1 byte

Definition at line 126 of file RandStdLib.hpp.

Member Typedef Documentation

◆ result_type

using alpaka::rand::engine::cpu::RandomDevice::result_type = std::random_device::result_type

Definition at line 138 of file RandStdLib.hpp.

Constructor & Destructor Documentation

◆ RandomDevice() [1/2]

alpaka::rand::engine::cpu::RandomDevice::RandomDevice ( )
default

◆ RandomDevice() [2/2]

ALPAKA_FN_HOST alpaka::rand::engine::cpu::RandomDevice::RandomDevice ( std::uint32_t const &  ,
std::uint32_t const &  = 0,
std::uint32_t const &  = 0 
)
inline

Definition at line 133 of file RandStdLib.hpp.

Member Function Documentation

◆ max()

static constexpr ALPAKA_FN_HOST auto alpaka::rand::engine::cpu::RandomDevice::max ( ) -> result_type
inlinestaticconstexpr

Definition at line 145 of file RandStdLib.hpp.

◆ min()

static constexpr ALPAKA_FN_HOST auto alpaka::rand::engine::cpu::RandomDevice::min ( ) -> result_type
inlinestaticconstexpr

Definition at line 140 of file RandStdLib.hpp.

◆ operator()()

ALPAKA_FN_HOST auto alpaka::rand::engine::cpu::RandomDevice::operator() ( ) -> result_type
inline

Definition at line 150 of file RandStdLib.hpp.


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