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

MKL VSLStreamStatePtr More...

#include <vsmc/utility/mkl.hpp>

Public Member Functions

 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 &&)=default
 
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...
 
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 &&)=default
 
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 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...
 
- Public Member Functions inherited from vsmc::MKLBase<::VSLStreamStatePtr, MKLStream >
 MKLBase ()=default
 
 MKLBase (const MKLBase< ::VSLStreamStatePtr, MKLStream > &)=delete
 
 MKLBase (MKLBase< ::VSLStreamStatePtr, MKLStream > &&)=default
 
pointer get () const
 
deleter_type & get_deleter ()
 
const deleter_type & get_deleter () const
 
 operator bool () const
 
MKLBase< ::VSLStreamStatePtr, MKLStream > & operator= (const MKLBase< ::VSLStreamStatePtr, MKLStream > &)=delete
 
MKLBase< ::VSLStreamStatePtr, MKLStream > & operator= (MKLBase< ::VSLStreamStatePtr, MKLStream > &&)=default
 
int release ()
 
void reset (pointer ptr)
 
void swap (MKLBase< ::VSLStreamStatePtr, MKLStream > &other)
 

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 int release (::VSLStreamStatePtr ptr)
 vslDeleteStream More...
 

Additional Inherited Members

- Public Types inherited from vsmc::MKLBase<::VSLStreamStatePtr, MKLStream >
using element_type = typename std::remove_pointer< ::VSLStreamStatePtr >::type
 
using pointer = ::VSLStreamStatePtr
 
- Protected Member Functions inherited from vsmc::MKLBase<::VSLStreamStatePtr, MKLStream >
void reset_ptr (pointer ptr)
 

Detailed Description

MKL VSLStreamStatePtr

Definition at line 147 of file mkl.hpp.

Constructor & Destructor Documentation

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

vslNewStream

Definition at line 151 of file mkl.hpp.

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

vslNewStreamEx

Definition at line 154 of file mkl.hpp.

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

vslCopyStream

Definition at line 160 of file mkl.hpp.

vsmc::MKLStream::MKLStream ( MKLStream &&  )
default

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 623 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 559 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 569 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 645 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 449 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 460 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 383 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 394 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 539 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 549 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 335 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 346 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 357 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 370 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 634 of file mkl.hpp.

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

vslGetStreamStateBrng

Definition at line 296 of file mkl.hpp.

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

vslGetBrngProperties

Definition at line 302 of file mkl.hpp.

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

vslGetNumRegBrngs

Definition at line 299 of file mkl.hpp.

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

vslGetStreamSize

Definition at line 273 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 517 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 528 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 656 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 405 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 416 of file mkl.hpp.

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

vslLeapfrogStream

Definition at line 276 of file mkl.hpp.

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

vslSaveStreamF

Definition at line 239 of file mkl.hpp.

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

vslLoadStreamM

Definition at line 261 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 493 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 505 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 689 of file mkl.hpp.

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

vslCopyStream/vslCopySreamState

Definition at line 170 of file mkl.hpp.

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

viRngPoisson

Definition at line 667 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 678 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 471 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 482 of file mkl.hpp.

static int vsmc::MKLStream::release ( ::VSLStreamStatePtr  ptr)
inlinestatic

vslDeleteStream

Definition at line 216 of file mkl.hpp.

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

vslNewStream

Definition at line 192 of file mkl.hpp.

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

vslNewStreamEx

Definition at line 204 of file mkl.hpp.

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

vslSaveStreamF

Definition at line 229 of file mkl.hpp.

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

vslSaveStreamM

Definition at line 251 of file mkl.hpp.

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

vslSkipAheadStream

Definition at line 286 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 313 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 324 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 579 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 590 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 601 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 612 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 427 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 438 of file mkl.hpp.