Celeritas 0.6.0-2+develop.96611fab
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
GenerateCanonical.hh File Reference
#include <limits>
#include <random>
#include <type_traits>
#include "corecel/Macros.hh"
#include "corecel/Types.hh"
This graph shows which files directly or indirectly include this file:

Classes

struct  celeritas::GenerateCanonical< Generator, RealType >
 Generate random numbers in [0, 1). More...
 

Enumerations

enum class  celeritas::GenerateCanonicalPolicy {
  std , builtin32 , builtin64 , custom ,
  size_
}
 Implementation of each GenerateCanonical, used for CachedRngEngine. More...
 

Functions

template<class RealType , class Generator >
CELER_FUNCTION RealType celeritas::generate_canonical (Generator &g)
 Helper function to generate a random uniform number.
 
template<class Generator >
CELER_FUNCTION real_type celeritas::generate_canonical (Generator &g)
 Sample a real_type on [0, 1).
 

Enumeration Type Documentation

◆ GenerateCanonicalPolicy

Implementation of each GenerateCanonical, used for CachedRngEngine.

Enumerator
std 

Use standard library.

builtin32 

Use detail::GenerateCanonical32.

builtin64 

Use detail::GenerateCanonical64 (not yet implemented)

custom 

Custom method.

Function Documentation

◆ generate_canonical() [1/2]

template<class RealType , class Generator >
CELER_FUNCTION RealType celeritas::generate_canonical ( Generator g)
inline

Helper function to generate a random uniform number.

Helper function to generate a random real number in [0, 1).

◆ generate_canonical() [2/2]

template<class Generator >
CELER_FUNCTION real_type celeritas::generate_canonical ( Generator g)
inline

Sample a real_type on [0, 1).

Helper function to generate a random real number in [0, 1).