vSMC
vSMC: Scalable Monte Carlo
Classes | Namespaces | Macros | Typedefs | Functions
common.hpp File Reference
#include <vsmc/internal/common.hpp>
#include <vsmc/utility/simd.hpp>
#include <vsmc/utility/mkl.hpp>

Go to the source code of this file.

Classes

class  vsmc::BernoulliIntDistribution< typename >
 
class  vsmc::BetaDistribution< RealType >
 beta distribution More...
 
class  vsmc::CauchyDistribution< RealType >
 Cauchy distribution. More...
 
class  vsmc::ChiSquaredDistribution< RealType >
 The \(\chi^2\) distribution. More...
 
class  vsmc::CounterEngine< Generator >
 Counter based RNG engine. More...
 
class  vsmc::DiscreteDistribution< IntType >
 Draw a single sample given weights. More...
 
class  vsmc::ExponentialDistribution< RealType >
 Exponential distribution. More...
 
class  vsmc::ExtremeValueDistribution< RealType >
 ExtremeValue distribution. More...
 
class  vsmc::FisherFDistribution< RealType >
 Fisher-F distribution. More...
 
class  vsmc::GammaDistribution< RealType >
 Gamma distribution. More...
 
class  vsmc::internal::IntBits< IntType >
 
class  vsmc::internal::IntBitsN< size_t >
 
class  vsmc::internal::IntBitsN< sizeof(int16_t)>
 
class  vsmc::internal::IntBitsN< sizeof(int32_t)>
 
class  vsmc::internal::IntBitsN< sizeof(int64_t)>
 
class  vsmc::internal::IntBitsN< sizeof(int8_t)>
 
class  vsmc::internal::internal::HasKeyType< T >
 
class  vsmc::internal::internal::HasKeyTypeImpl< T >
 
class  vsmc::internal::internal::KeyTypeDispatch< T, bool >
 
class  vsmc::internal::internal::KeyTypeDispatch< T, false >
 
class  vsmc::internal::internal::KeyTypeDispatch< T, true >
 
class  vsmc::internal::is_seed_seq< SeedSeq, U, V, W >
 
class  vsmc::internal::KeyTypeTrait< T >
 
class  vsmc::internal::KeyTypeTrait< T >
 
class  vsmc::internal::RNGBits< RNGType >
 
class  vsmc::internal::RNGBitsN< UMax, N >
 
class  vsmc::internal::RNGBitsN< UMax, 0 >
 
class  vsmc::internal::RNGBitsNMax< N >
 
class  vsmc::internal::RNGMaxBits< RNGType >
 
class  vsmc::internal::RNGMinBits< RNGType >
 
class  vsmc::LaplaceDistribution< RealType >
 Laplace distribution. More...
 
class  vsmc::LevyDistribution< RealType >
 Levy distribution. More...
 
class  vsmc::LogisticDistribution< RealType >
 Logistic distribution. More...
 
class  vsmc::LognormalDistribution< RealType >
 Lognormal distribution. More...
 
class  vsmc::MKLEngine< BRNG, Bits >
 MKL RNG C++11 engine. More...
 
class  vsmc::NormalDistribution< RealType >
 Normal distribution. More...
 
class  vsmc::ParetoDistribution< RealType >
 Pareto distribution. More...
 
class  vsmc::RayleighDistribution< RealType >
 Rayleigh distribution. More...
 
class  vsmc::StudentTDistribution< RealType >
 Student-t distribution. More...
 
class  vsmc::U01LRDistribution< RealType, Left, Right >
 Standard uniform distribution with open/closed variants. More...
 
class  vsmc::UniformBitsDistribution< UIntType >
 Uniform bits distribution. More...
 
class  vsmc::UniformRealLRDistribution< RealType, Left, Right >
 Uniform real distribution with open/closed variants. More...
 
class  vsmc::WeibullDistribution< RealType >
 Weibull distribution. More...
 

Namespaces

 vsmc
 
 vsmc::internal
 
 vsmc::internal::internal
 

Macros

#define VSMC_DEFINE_RNG_DISTRIBUTION_1(Name, name, T, T1, p1, v1)
 
#define VSMC_DEFINE_RNG_DISTRIBUTION_2(Name, name, T, T1, p1, v1, T2, p2, v2)
 
#define VSMC_DEFINE_RNG_DISTRIBUTION_OPERATORS
 
#define VSMC_RUNTIME_ASSERT_RNG_DISTRIBUTION_PARAM(flag, Name)
 

Typedefs

template<typename T >
using vsmc::internal::KeyType = typename KeyTypeTrait< T >::type
 

Functions

template<typename IntType , typename RNGType >
void vsmc::bernoulli_distribution (RNGType &, std::size_t, IntType *, double)
 
template<MKL_INT BRNG, int Bits>
void vsmc::bernoulli_distribution (MKLEngine< BRNG, Bits > &, std::size_t, MKL_INT *, double)
 
template<typename RealType , typename RNGType >
void vsmc::beta_distribution (RNGType &rng, std::size_t n, RealType *r, RealType alpha, RealType beta)
 Generating beta random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::beta_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::beta_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename RealType , typename RNGType >
void vsmc::cauchy_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating cauchy random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::cauchy_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::cauchy_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename RealType , typename RNGType >
void vsmc::chi_squared_distribution (RNGType &rng, std::size_t n, RealType *r, RealType df)
 Generating \(\chi^2\) random variates. More...
 
template<typename RealType , typename RNGType >
void vsmc::exponential_distribution (RNGType &rng, std::size_t n, RealType *r, RealType lambda)
 Generating exponential random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::exponential_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::exponential_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double)
 
template<typename RealType , typename RNGType >
void vsmc::extreme_value_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating extreme_value random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::extreme_value_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::extreme_value_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename RealType , typename RNGType >
void vsmc::fisher_f_distribution (RNGType &rng, std::size_t n, RealType *r, RealType df1, RealType df2)
 Generating Fisher-F random variates. More...
 
template<typename RealType , typename RNGType >
void vsmc::gamma_distribution (RNGType &rng, std::size_t n, RealType *r, RealType alpha, RealType beta)
 Generating gamma random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::gamma_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::gamma_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename T >
bool vsmc::internal::is_equal (const T &a, const T &b)
 
template<typename RealType , typename RNGType >
void vsmc::laplace_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating laplace random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::laplace_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::laplace_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename RealType , typename RNGType >
void vsmc::levy_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating levy random variates. More...
 
template<typename RealType , typename RNGType >
void vsmc::logistic_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating logistic random variates. More...
 
template<typename RealType , typename RNGType >
void vsmc::lognormal_distribution (RNGType &rng, std::size_t n, RealType *r, RealType logmean, RealType logstddev)
 Generating lognormal random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::lognormal_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::lognormal_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename RealType , typename RNGType >
void vsmc::normal_distribution (RNGType &rng, std::size_t n, RealType *r, RealType mean, RealType stddev)
 Generating normal random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::normal_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *r, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::normal_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *r, double, double)
 
template<typename RealType , typename RNGType >
void vsmc::pareto_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating pareto random variates. More...
 
template<typename RealType , typename RNGType >
void vsmc::rayleigh_distribution (RNGType &rng, std::size_t n, RealType *r, RealType sigma)
 Generating rayleigh random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::rayleigh_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::rayleigh_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, ChiSquaredDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, ExponentialDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, ExtremeValueDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, CauchyDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, FisherFDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, GammaDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RNGType >
void vsmc::rng_rand (RNGType &rng, std::size_t n, typename RNGType::result_type *r)
 Generate random bits. More...
 
template<typename Generator >
void vsmc::rng_rand (CounterEngine< Generator > &rng, std::size_t n, typename CounterEngine< Generator >::result_type *r)
 
template<typename IntType , typename RNGType >
void vsmc::rng_rand (RNGType &, BernoulliIntDistribution< IntType > &, std::size_t, IntType *)
 
template<typename UIntType , typename RNGType >
void vsmc::rng_rand (RNGType &, UniformBitsDistribution< UIntType > &, std::size_t, UIntType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, DiscreteDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, LaplaceDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, LevyDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, LogisticDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, LognormalDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, NormalDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &rng, BetaDistribution< RealType > &dist, std::size_t n, RealType *r)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, ParetoDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, RayleighDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, StudentTDistribution< RealType > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType , typename Left , typename Right >
void vsmc::rng_rand (RNGType &, U01LRDistribution< RealType, Left, Right > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType , typename Left , typename Right >
void vsmc::rng_rand (RNGType &, UniformRealLRDistribution< RealType, Left, Right > &, std::size_t, RealType *)
 
template<typename RealType , typename RNGType >
void vsmc::rng_rand (RNGType &, WeibullDistribution< RealType > &, std::size_t, RealType *)
 
template<MKL_INT BRNG, int Bits>
void vsmc::rng_rand (MKLEngine< BRNG, Bits > &, std::size_t, typename MKLEngine< BRNG, Bits >::result_type *)
 
template<typename RealType , typename RNGType >
void vsmc::student_t_distribution (RNGType &rng, std::size_t n, RealType *r, RealType df)
 Generating student-t random variates. More...
 
template<typename RealType , typename Left , typename Right , typename RNGType >
void vsmc::u01_distribution (RNGType &, std::size_t, RealType *)
 Generate standard uniform random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::u01_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *)
 
template<MKL_INT BRNG, int Bits>
void vsmc::u01_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *)
 
template<typename RealType , typename RNGType >
void vsmc::u01_lr_distribution (RNGType &, std::size_t, RealType *)
 Generate standard uniform random variates with open/closed variants. More...
 
template<typename UIntType , typename RNGType >
void vsmc::uniform_bits_distribution (RNGType &, std::size_t, UIntType *)
 
template<typename RealType , typename RNGType >
void vsmc::uniform_real_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generate uniform real random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::uniform_real_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::uniform_real_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 
template<typename RealType , typename Left , typename Right , typename RNGType >
void vsmc::uniform_real_lr_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generate uniform real random variates with open/closed variants. More...
 
template<typename RealType , typename RNGType >
void vsmc::weibull_distribution (RNGType &rng, std::size_t n, RealType *r, RealType a, RealType b)
 Generating weibull random variates. More...
 
template<MKL_INT BRNG, int Bits>
void vsmc::weibull_distribution (MKLEngine< BRNG, Bits > &, std::size_t, float *, float, float)
 
template<MKL_INT BRNG, int Bits>
void vsmc::weibull_distribution (MKLEngine< BRNG, Bits > &, std::size_t, double *, double, double)
 

Macro Definition Documentation

#define VSMC_DEFINE_RNG_DISTRIBUTION_1 (   Name,
  name,
  T,
  T1,
  p1,
  v1 
)

Definition at line 45 of file common.hpp.

#define VSMC_DEFINE_RNG_DISTRIBUTION_2 (   Name,
  name,
  T,
  T1,
  p1,
  v1,
  T2,
  p2,
  v2 
)

Definition at line 159 of file common.hpp.

#define VSMC_DEFINE_RNG_DISTRIBUTION_OPERATORS

Definition at line 286 of file common.hpp.

#define VSMC_RUNTIME_ASSERT_RNG_DISTRIBUTION_PARAM (   flag,
  Name 
)
Value:
"**" #Name "Distribution** CONSTRUCTED WITH INVALID PARAMETERS")
#define VSMC_RUNTIME_ASSERT(cond, msg)
Definition: assert.hpp:55

Definition at line 41 of file common.hpp.