vSMC  v3.0.0
Scalable Monte Carlo
Public Member Functions | Static Public Member Functions | List of all members
vsmc::MKLStream Class Reference

MKL VSLStreamStatePtr wrapper. More...

#include <vsmc/rng/mkl.hpp>

Public Member Functions

 MKLStream (::VSLStreamStatePtr ptr=nullptr)
 
 MKLStream (MKL_INT brng, MKL_UINT seed)
 vslNewStream More...
 
 MKLStream (MKL_INT brng, MKL_INT n, unsigned *params)
 vslNewStreamEx More...
 
 MKLStream (const MKLStream &other)
 vslCopyStream More...
 
 MKLStream (MKLStream &&other)
 
 ~MKLStream ()
 vslDeleteStream More...
 
int bernoulli (MKL_INT n, int *r, double p, MKL_INT method=VSL_RNG_METHOD_BERNOULLI_ICDF)
 viRngBernoulli More...
 
int beta (MKL_INT n, float *r, float p, float q, float a, float beta, MKL_INT method=VSL_RNG_METHOD_BETA_CJA)
 vsRngBeta More...
 
int beta (MKL_INT n, double *r, double p, double q, double a, double beta, MKL_INT method=VSL_RNG_METHOD_BETA_CJA)
 vdRngBeta More...
 
int binomial (MKL_INT n, int *r, int ntrial, double p, MKL_INT method=VSL_RNG_METHOD_BINOMIAL_BTPE)
 viRngBinomial More...
 
int cauchy (MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_CAUCHY_ICDF)
 vsRngCauchy More...
 
int cauchy (MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_CAUCHY_ICDF)
 vdRngCauchy More...
 
bool empty () const
 
int exponential (MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_EXPONENTIAL_ICDF)
 vsRngExponential More...
 
int exponential (MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_EXPONENTIAL_ICDF)
 vdRngExponential More...
 
int gamma (MKL_INT n, float *r, float alpha, float a, float beta, MKL_INT method=VSL_RNG_METHOD_GAMMA_GNORM)
 vsRngGamma More...
 
int gamma (MKL_INT n, double *r, double alpha, double a, double beta, MKL_INT method=VSL_RNG_METHOD_GAMMA_GNORM)
 vdRngGamma More...
 
int gaussian (MKL_INT n, float *r, float a, float sigma, MKL_INT method=VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
 vsRngGaussian More...
 
int gaussian (MKL_INT n, double *r, double a, double sigma, MKL_INT method=VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2)
 vdRngGaussian More...
 
int gaussian_mv (MKL_INT n, float *r, MKL_INT dimen, MKL_INT mstorage, const float *a, const float *t, MKL_INT method=VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
 vsRngGaussianMV More...
 
int gaussian_mv (MKL_INT n, double *r, MKL_INT dimen, MKL_INT mstorage, const double *a, const double *t, MKL_INT method=VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2)
 vdRngGaussianMV More...
 
int geometric (MKL_INT n, int *r, double p, MKL_INT method=VSL_RNG_METHOD_GEOMETRIC_ICDF)
 viRngGeometric More...
 
int get_brng () const
 vslGetStreamStateBrng More...
 
int get_size () const
 vslGetStreamSize More...
 
int gumbel (MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_GUMBEL_ICDF)
 vsRngGumbel More...
 
int gumbel (MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_GUMBEL_ICDF)
 vdRngGumbel More...
 
int hypergeometric (MKL_INT n, int *r, int l, int s, int m, MKL_INT method=VSL_RNG_METHOD_HYPERGEOMETRIC_H2PE)
 viRngHypergeometric More...
 
int laplace (MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_LAPLACE_ICDF)
 vsRngLaplace More...
 
int laplace (MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_LAPLACE_ICDF)
 vdRngLaplace More...
 
int leapfrog (MKL_INT k, MKL_INT nstreams)
 vslLeapfrogStream More...
 
int load_f (const std::string &fname)
 vslSaveStreamF More...
 
int load_m (const char *memptr)
 vslLoadStreamM More...
 
int lognormal (MKL_INT n, float *r, float a, float sigma, float b, float beta, MKL_INT method=VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
 vsRngLognormal More...
 
int lognormal (MKL_INT n, double *r, double a, double sigma, double b, double beta, MKL_INT method=VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2)
 vdRngLognormal More...
 
int neg_binomial (MKL_INT n, int *r, double a, double p, MKL_INT method=VSL_RNG_METHOD_NEGBINOMIAL_NBAR)
 viRngNegbinomial More...
 
MKLStreamoperator= (const MKLStream &other)
 vslCopyStream/vslCopySreamState More...
 
MKLStreamoperator= (MKLStream &&other)
 
int poisson (MKL_INT n, int *r, double lambda, MKL_INT method=VSL_RNG_METHOD_POISSON_PTPE)
 viRngPoisson More...
 
int poisson_v (MKL_INT n, int *r, const double *lambda, MKL_INT method=VSL_RNG_METHOD_POISSONV_POISNORM)
 viRngPoissonV More...
 
int rayleigh (MKL_INT n, float *r, float a, float beta, MKL_INT method=VSL_RNG_METHOD_RAYLEIGH_ICDF)
 vsRngRayleigh More...
 
int rayleigh (MKL_INT n, double *r, double a, double beta, MKL_INT method=VSL_RNG_METHOD_RAYLEIGH_ICDF)
 vdRngRayleigh More...
 
int release ()
 vslDeleteStream More...
 
int reset (::VSLStreamStatePtr ptr)
 
int reset (MKL_INT brng, MKL_UINT seed)
 vslNewStream More...
 
int reset (MKL_INT brng, MKL_INT n, unsigned *params)
 vslNewStreamEx More...
 
int save_f (const std::string &fname) const
 vslSaveStreamF More...
 
int save_m (char *memptr) const
 vslSaveStreamM More...
 
int skip_ahead (long long nskip)
 vslSkipAheadStream More...
 
int uniform (MKL_INT n, float *r, float a, float b, MKL_INT method=VSL_RNG_METHOD_UNIFORM_STD)
 vsRngUniform More...
 
int uniform (MKL_INT n, double *r, double a, double b, MKL_INT method=VSL_RNG_METHOD_UNIFORM_STD)
 vdRngUniform More...
 
int uniform (MKL_INT n, int *r, int a, int b, MKL_INT method=VSL_RNG_METHOD_UNIFORM_STD)
 viRngUniform More...
 
int uniform_bits (MKL_INT n, unsigned *r, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS_STD)
 viRngUniform More...
 
int uniform_bits32 (MKL_INT n, unsigned *r, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS32_STD)
 viRngUniform32 More...
 
int uniform_bits64 (MKL_INT n, unsigned MKL_INT64 *r, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS64_STD)
 viRngUniform64 More...
 
int weibull (MKL_INT n, float *r, float alpha, float a, float beta, MKL_INT method=VSL_RNG_METHOD_WEIBULL_ICDF)
 vsRngWeibull More...
 
int weibull (MKL_INT n, double *r, double alpha, double a, double beta, MKL_INT method=VSL_RNG_METHOD_WEIBULL_ICDF)
 vdRngWeibull More...
 

Static Public Member Functions

static int get_brng_properties (MKL_INT brng,::VSLBRngProperties *properties)
 vslGetBrngProperties More...
 
static int get_num_reg_brngs ()
 vslGetNumRegBrngs More...
 
static bool has_leap_frog (MKL_INT brng)
 Test if vslLeapfrogStream is supported. More...
 
static bool has_skip_ahead (MKL_INT brng)
 Test if vslSkipAheadStream is supported. More...
 
static bool has_uniform_bits32 (MKL_INT brng, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS32_STD)
 Test if viRngUniformBits32 is supported. More...
 
static bool has_uniform_bits64 (MKL_INT brng, MKL_INT method=VSL_RNG_METHOD_UNIFORMBITS64_STD)
 Test if viRngUniformBits64 is supported. More...
 

Detailed Description

MKL VSLStreamStatePtr wrapper.

Definition at line 83 of file mkl.hpp.

Constructor & Destructor Documentation

vsmc::MKLStream::MKLStream ( ::VSLStreamStatePtr  ptr = nullptr)
inlineexplicit

Definition at line 86 of file mkl.hpp.

vsmc::MKLStream::MKLStream ( MKL_INT  brng,
MKL_UINT  seed 
)
inline

vslNewStream

Definition at line 92 of file mkl.hpp.

vsmc::MKLStream::MKLStream ( MKL_INT  brng,
MKL_INT  n,
unsigned *  params 
)
inline

vslNewStreamEx

Definition at line 98 of file mkl.hpp.

vsmc::MKLStream::MKLStream ( const MKLStream other)
inline

vslCopyStream

Definition at line 104 of file mkl.hpp.

vsmc::MKLStream::MKLStream ( MKLStream &&  other)
inline

Definition at line 128 of file mkl.hpp.

vsmc::MKLStream::~MKLStream ( )
inline

vslDeleteStream

Definition at line 142 of file mkl.hpp.

Member Function Documentation

int vsmc::MKLStream::bernoulli ( MKL_INT  n,
int *  r,
double  p,
MKL_INT  method = VSL_RNG_METHOD_BERNOULLI_ICDF 
)
inline

viRngBernoulli

Definition at line 558 of file mkl.hpp.

int vsmc::MKLStream::beta ( MKL_INT  n,
float *  r,
float  p,
float  q,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_BETA_CJA 
)
inline

vsRngBeta

Definition at line 504 of file mkl.hpp.

int vsmc::MKLStream::beta ( MKL_INT  n,
double *  r,
double  p,
double  q,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_BETA_CJA 
)
inline

vdRngBeta

Definition at line 513 of file mkl.hpp.

int vsmc::MKLStream::binomial ( MKL_INT  n,
int *  r,
int  ntrial,
double  p,
MKL_INT  method = VSL_RNG_METHOD_BINOMIAL_BTPE 
)
inline

viRngBinomial

Definition at line 576 of file mkl.hpp.

int vsmc::MKLStream::cauchy ( MKL_INT  n,
float *  r,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_CAUCHY_ICDF 
)
inline

vsRngCauchy

Definition at line 414 of file mkl.hpp.

int vsmc::MKLStream::cauchy ( MKL_INT  n,
double *  r,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_CAUCHY_ICDF 
)
inline

vdRngCauchy

Definition at line 423 of file mkl.hpp.

bool vsmc::MKLStream::empty ( ) const
inline

Definition at line 191 of file mkl.hpp.

int vsmc::MKLStream::exponential ( MKL_INT  n,
float *  r,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_EXPONENTIAL_ICDF 
)
inline

vsRngExponential

Definition at line 360 of file mkl.hpp.

int vsmc::MKLStream::exponential ( MKL_INT  n,
double *  r,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_EXPONENTIAL_ICDF 
)
inline

vdRngExponential

Definition at line 369 of file mkl.hpp.

int vsmc::MKLStream::gamma ( MKL_INT  n,
float *  r,
float  alpha,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_GAMMA_GNORM 
)
inline

vsRngGamma

Definition at line 486 of file mkl.hpp.

int vsmc::MKLStream::gamma ( MKL_INT  n,
double *  r,
double  alpha,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_GAMMA_GNORM 
)
inline

vdRngGamma

Definition at line 495 of file mkl.hpp.

int vsmc::MKLStream::gaussian ( MKL_INT  n,
float *  r,
float  a,
float  sigma,
MKL_INT  method = VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2 
)
inline

vsRngGaussian

Definition at line 322 of file mkl.hpp.

int vsmc::MKLStream::gaussian ( MKL_INT  n,
double *  r,
double  a,
double  sigma,
MKL_INT  method = VSL_RNG_METHOD_GAUSSIAN_BOXMULLER2 
)
inline

vdRngGaussian

Definition at line 331 of file mkl.hpp.

int vsmc::MKLStream::gaussian_mv ( MKL_INT  n,
float *  r,
MKL_INT  dimen,
MKL_INT  mstorage,
const float *  a,
const float *  t,
MKL_INT  method = VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2 
)
inline

vsRngGaussianMV

Definition at line 340 of file mkl.hpp.

int vsmc::MKLStream::gaussian_mv ( MKL_INT  n,
double *  r,
MKL_INT  dimen,
MKL_INT  mstorage,
const double *  a,
const double *  t,
MKL_INT  method = VSL_RNG_METHOD_GAUSSIANMV_BOXMULLER2 
)
inline

vdRngGaussianMV

Definition at line 350 of file mkl.hpp.

int vsmc::MKLStream::geometric ( MKL_INT  n,
int *  r,
double  p,
MKL_INT  method = VSL_RNG_METHOD_GEOMETRIC_ICDF 
)
inline

viRngGeometric

Definition at line 567 of file mkl.hpp.

int vsmc::MKLStream::get_brng ( ) const
inline

vslGetStreamStateBrng

Definition at line 251 of file mkl.hpp.

static int vsmc::MKLStream::get_brng_properties ( MKL_INT  brng,
::VSLBRngProperties *  properties 
)
inlinestatic

vslGetBrngProperties

Definition at line 257 of file mkl.hpp.

static int vsmc::MKLStream::get_num_reg_brngs ( )
inlinestatic

vslGetNumRegBrngs

Definition at line 254 of file mkl.hpp.

int vsmc::MKLStream::get_size ( ) const
inline

vslGetStreamSize

Definition at line 233 of file mkl.hpp.

int vsmc::MKLStream::gumbel ( MKL_INT  n,
float *  r,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_GUMBEL_ICDF 
)
inline

vsRngGumbel

Definition at line 468 of file mkl.hpp.

int vsmc::MKLStream::gumbel ( MKL_INT  n,
double *  r,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_GUMBEL_ICDF 
)
inline

vdRngGumbel

Definition at line 477 of file mkl.hpp.

static bool vsmc::MKLStream::has_leap_frog ( MKL_INT  brng)
inlinestatic

Test if vslLeapfrogStream is supported.

Definition at line 266 of file mkl.hpp.

static bool vsmc::MKLStream::has_skip_ahead ( MKL_INT  brng)
inlinestatic

Test if vslSkipAheadStream is supported.

Definition at line 274 of file mkl.hpp.

static bool vsmc::MKLStream::has_uniform_bits32 ( MKL_INT  brng,
MKL_INT  method = VSL_RNG_METHOD_UNIFORMBITS32_STD 
)
inlinestatic

Test if viRngUniformBits32 is supported.

Definition at line 282 of file mkl.hpp.

static bool vsmc::MKLStream::has_uniform_bits64 ( MKL_INT  brng,
MKL_INT  method = VSL_RNG_METHOD_UNIFORMBITS64_STD 
)
inlinestatic

Test if viRngUniformBits64 is supported.

Definition at line 293 of file mkl.hpp.

int vsmc::MKLStream::hypergeometric ( MKL_INT  n,
int *  r,
int  l,
int  s,
int  m,
MKL_INT  method = VSL_RNG_METHOD_HYPERGEOMETRIC_H2PE 
)
inline

viRngHypergeometric

Definition at line 585 of file mkl.hpp.

int vsmc::MKLStream::laplace ( MKL_INT  n,
float *  r,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_LAPLACE_ICDF 
)
inline

vsRngLaplace

Definition at line 378 of file mkl.hpp.

int vsmc::MKLStream::laplace ( MKL_INT  n,
double *  r,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_LAPLACE_ICDF 
)
inline

vdRngLaplace

Definition at line 387 of file mkl.hpp.

int vsmc::MKLStream::leapfrog ( MKL_INT  k,
MKL_INT  nstreams 
)
inline

vslLeapfrogStream

Definition at line 236 of file mkl.hpp.

int vsmc::MKLStream::load_f ( const std::string &  fname)
inline

vslSaveStreamF

Definition at line 201 of file mkl.hpp.

int vsmc::MKLStream::load_m ( const char *  memptr)
inline

vslLoadStreamM

Definition at line 221 of file mkl.hpp.

int vsmc::MKLStream::lognormal ( MKL_INT  n,
float *  r,
float  a,
float  sigma,
float  b,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2 
)
inline

vsRngLognormal

Definition at line 450 of file mkl.hpp.

int vsmc::MKLStream::lognormal ( MKL_INT  n,
double *  r,
double  a,
double  sigma,
double  b,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_LOGNORMAL_BOXMULLER2 
)
inline

vdRngLognormal

Definition at line 459 of file mkl.hpp.

int vsmc::MKLStream::neg_binomial ( MKL_INT  n,
int *  r,
double  a,
double  p,
MKL_INT  method = VSL_RNG_METHOD_NEGBINOMIAL_NBAR 
)
inline

viRngNegbinomial

Definition at line 612 of file mkl.hpp.

MKLStream& vsmc::MKLStream::operator= ( const MKLStream other)
inline

vslCopyStream/vslCopySreamState

Definition at line 114 of file mkl.hpp.

MKLStream& vsmc::MKLStream::operator= ( MKLStream &&  other)
inline

Definition at line 130 of file mkl.hpp.

int vsmc::MKLStream::poisson ( MKL_INT  n,
int *  r,
double  lambda,
MKL_INT  method = VSL_RNG_METHOD_POISSON_PTPE 
)
inline

viRngPoisson

Definition at line 594 of file mkl.hpp.

int vsmc::MKLStream::poisson_v ( MKL_INT  n,
int *  r,
const double *  lambda,
MKL_INT  method = VSL_RNG_METHOD_POISSONV_POISNORM 
)
inline

viRngPoissonV

Definition at line 603 of file mkl.hpp.

int vsmc::MKLStream::rayleigh ( MKL_INT  n,
float *  r,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_RAYLEIGH_ICDF 
)
inline

vsRngRayleigh

Definition at line 432 of file mkl.hpp.

int vsmc::MKLStream::rayleigh ( MKL_INT  n,
double *  r,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_RAYLEIGH_ICDF 
)
inline

vdRngRayleigh

Definition at line 441 of file mkl.hpp.

int vsmc::MKLStream::release ( )
inline

vslDeleteStream

Definition at line 179 of file mkl.hpp.

int vsmc::MKLStream::reset ( ::VSLStreamStatePtr  ptr)
inline

Definition at line 144 of file mkl.hpp.

int vsmc::MKLStream::reset ( MKL_INT  brng,
MKL_UINT  seed 
)
inline

vslNewStream

Definition at line 153 of file mkl.hpp.

int vsmc::MKLStream::reset ( MKL_INT  brng,
MKL_INT  n,
unsigned *  params 
)
inline

vslNewStreamEx

Definition at line 166 of file mkl.hpp.

int vsmc::MKLStream::save_f ( const std::string &  fname) const
inline

vslSaveStreamF

Definition at line 194 of file mkl.hpp.

int vsmc::MKLStream::save_m ( char *  memptr) const
inline

vslSaveStreamM

Definition at line 214 of file mkl.hpp.

int vsmc::MKLStream::skip_ahead ( long long  nskip)
inline

vslSkipAheadStream

Definition at line 244 of file mkl.hpp.

int vsmc::MKLStream::uniform ( MKL_INT  n,
float *  r,
float  a,
float  b,
MKL_INT  method = VSL_RNG_METHOD_UNIFORM_STD 
)
inline

vsRngUniform

Definition at line 304 of file mkl.hpp.

int vsmc::MKLStream::uniform ( MKL_INT  n,
double *  r,
double  a,
double  b,
MKL_INT  method = VSL_RNG_METHOD_UNIFORM_STD 
)
inline

vdRngUniform

Definition at line 313 of file mkl.hpp.

int vsmc::MKLStream::uniform ( MKL_INT  n,
int *  r,
int  a,
int  b,
MKL_INT  method = VSL_RNG_METHOD_UNIFORM_STD 
)
inline

viRngUniform

Definition at line 522 of file mkl.hpp.

int vsmc::MKLStream::uniform_bits ( MKL_INT  n,
unsigned *  r,
MKL_INT  method = VSL_RNG_METHOD_UNIFORMBITS_STD 
)
inline

viRngUniform

Definition at line 531 of file mkl.hpp.

int vsmc::MKLStream::uniform_bits32 ( MKL_INT  n,
unsigned *  r,
MKL_INT  method = VSL_RNG_METHOD_UNIFORMBITS32_STD 
)
inline

viRngUniform32

Definition at line 540 of file mkl.hpp.

int vsmc::MKLStream::uniform_bits64 ( MKL_INT  n,
unsigned MKL_INT64 *  r,
MKL_INT  method = VSL_RNG_METHOD_UNIFORMBITS64_STD 
)
inline

viRngUniform64

Definition at line 549 of file mkl.hpp.

int vsmc::MKLStream::weibull ( MKL_INT  n,
float *  r,
float  alpha,
float  a,
float  beta,
MKL_INT  method = VSL_RNG_METHOD_WEIBULL_ICDF 
)
inline

vsRngWeibull

Definition at line 396 of file mkl.hpp.

int vsmc::MKLStream::weibull ( MKL_INT  n,
double *  r,
double  alpha,
double  a,
double  beta,
MKL_INT  method = VSL_RNG_METHOD_WEIBULL_ICDF 
)
inline

vdRngWeibull

Definition at line 405 of file mkl.hpp.