BioCMAMC-ST
MC::KPRNG Class Reference

Utilities and wrap around kokkos random generator. More...

#include <prng.hpp>

Public Types

using pool_type

Public Member Functions

 KPRNG (size_t _seed=0)
KOKKOS_INLINE_FUNCTION double double_uniform () const
template<FloatingPointType T>
KOKKOS_INLINE_FUNCTION T uniform () const
template<FloatingPointType T>
KOKKOS_INLINE_FUNCTION T uniform (T a, T b) const
Kokkos::View< double *, ComputeSpacedouble_uniform (size_t n_sample, double a=0., double b=1.) const
template<size_t n_r>
Kokkos::View< double[n_r], ComputeSpacedouble_uniform_view () const
template<size_t n_r>
KOKKOS_INLINE_FUNCTION std::array< double, n_r > double_uniform () const
KOKKOS_INLINE_FUNCTION uint64_t uniform_u (uint64_t a, uint64_t b) const
auto get_seed () const

Public Attributes

pool_type random_pool

Private Member Functions

template<typename random_pool_t, size_t n_r, size_t... I>
KOKKOS_INLINE_FUNCTION std::array< double, n_r > generate_uniform_impl (random_pool_t pool, std::index_sequence< I... >) const

Private Attributes

std::size_t seed {}

Detailed Description

Utilities and wrap around kokkos random generator.

Member Typedef Documentation

◆ pool_type

Initial value:
Kokkos::Random_XorShift1024_Pool<Kokkos::DefaultExecutionSpace>
Examples
example_model.cxx.

Constructor & Destructor Documentation

◆ KPRNG()

MC::KPRNG::KPRNG ( size_t _seed = 0)
explicit

Member Function Documentation

◆ double_uniform() [1/3]

KOKKOS_INLINE_FUNCTION double MC::KPRNG::double_uniform ( ) const
inlinenodiscard

◆ double_uniform() [2/3]

template<size_t n_r>
KOKKOS_INLINE_FUNCTION std::array< double, n_r > MC::KPRNG::double_uniform ( ) const
inline
Here is the call graph for this function:

◆ double_uniform() [3/3]

Kokkos::View< double *, ComputeSpace > MC::KPRNG::double_uniform ( size_t n_sample,
double a = 0.,
double b = 1. ) const
nodiscard

◆ double_uniform_view()

template<size_t n_r>
Kokkos::View< double[n_r], ComputeSpace > MC::KPRNG::double_uniform_view ( ) const
inline

◆ generate_uniform_impl()

template<typename random_pool_t, size_t n_r, size_t... I>
KOKKOS_INLINE_FUNCTION std::array< double, n_r > MC::KPRNG::generate_uniform_impl ( random_pool_t pool,
std::index_sequence< I... >  ) const
inlineprivate
Here is the caller graph for this function:

◆ get_seed()

auto MC::KPRNG::get_seed ( ) const
inlinenodiscard

◆ uniform() [1/2]

template<FloatingPointType T>
KOKKOS_INLINE_FUNCTION T MC::KPRNG::uniform ( ) const
inline

◆ uniform() [2/2]

template<FloatingPointType T>
KOKKOS_INLINE_FUNCTION T MC::KPRNG::uniform ( T a,
T b ) const
inline

◆ uniform_u()

KOKKOS_INLINE_FUNCTION uint64_t MC::KPRNG::uniform_u ( uint64_t a,
uint64_t b ) const
inlinenodiscard

Member Data Documentation

◆ random_pool

pool_type MC::KPRNG::random_pool

◆ seed

std::size_t MC::KPRNG::seed {}
private

The documentation for this class was generated from the following files:
  • apps/libs/mc/public/mc/prng/prng.hpp
  • apps/libs/mc/src/prng.cpp