OpenMPCD
Public Member Functions | List of all members
OpenMPCD::CUDA::Random::Distributions::Uniform0e1i< T > Class Template Reference

The uniform distribution in the left-open interval \( (0, 1] \). More...

#include <Uniform0e1i.hpp>

Public Member Functions

template<typename RNG >
OPENMPCD_CUDA_DEVICEoperator() (RNG &rng) const
 Generates a random value sampled from the distribution. More...
 
template<typename RNG >
OPENMPCD_CUDA_DEVICE void operator() (RNG &rng, T *const r1, T *const r2) const
 Generates two random values sampled from the distribution. More...
 

Detailed Description

template<typename T>
class OpenMPCD::CUDA::Random::Distributions::Uniform0e1i< T >

The uniform distribution in the left-open interval \( (0, 1] \).

The value \( 0 \) does not lie within the range of possible values, but \( 1 \) does.

Template Parameters
TThe underlying data type, which must be float or double.

Definition at line 36 of file Uniform0e1i.hpp.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
template<typename RNG >
OPENMPCD_CUDA_DEVICE T OpenMPCD::CUDA::Random::Distributions::Uniform0e1i< T >::operator() ( RNG rng) const

Generates a random value sampled from the distribution.

Template Parameters
RNGThe random number generator type.
Parameters
[in]rngThe random number generator instance.

◆ operator()() [2/2]

template<typename T >
template<typename RNG >
OPENMPCD_CUDA_DEVICE void OpenMPCD::CUDA::Random::Distributions::Uniform0e1i< T >::operator() ( RNG rng,
T *const  r1,
T *const  r2 
) const

Generates two random values sampled from the distribution.

Template Parameters
RNGThe random number generator type.
Parameters
[in]rngThe random number generator instance.
[out]r1Pointer to where the first random number should be stored; must not be nullptr.
[out]r2Pointer to where the second random number should be stored; must not be nullptr.

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