Contents

# Distributions

oneMKL RNG routines are used to generate random numbers with different types of distribution. Each function group is introduced below by the type of underlying distribution and contains a short description of its functionality, as well as specifications of the call sequence and the explanation of input and output parameters. The following tables list the random number generator routines with data types and output distributions, and sets correspondence between data types of the generator routines and the basic random number generators.
Type of Distribution
Data Types
BRNG Data Type
Description
s, d
s, d
Uniform continuous distribution on the interval [
a,b
)
s, d
s, d
Normal (Gaussian) distribution
s, d
s, d
Normal (Gaussian) multivariate distribution
s, d
s, d
Exponential distribution
s, d
s, d
Laplace distribution (double exponential distribution)
s, d
s, d
Weibull distribution
s, d
s, d
Cauchy distribution
s, d
s, d
Rayleigh distribution
s, d
s, d
Lognormal distribution
s, d
s, d
Gumbel (extreme value) distribution
s, d
s, d
Gamma distribution
s, d
s, d
Beta distribution
s, d
s, d
Chi-Square distribution
Type of Distribution
Data Types
BRNG Data Type
Description
i
GPU:
s for
oneapi::mkl::rng::uniform_method::standard
,
d for
oneapi::mkl::rng::method::accurate
CPU/Host:
d for both methods
Uniform discrete distribution on the interval [
a,b
)
i
i
Uniformly distributed bits in 32-bit chunks
i
i
Uniformly distributed bits in 64-bit chunks
i
i
Bits of underlying BRNG integer recurrence
i
s
Bernoulli distribution
i
s
Geometric distribution
i
d
Binomial distribution
i
d
Hypergeometric distribution
i
s (for )
oneapi::mkl::rng::poisson_method::gaussian_icdf_based
s (for distribution parameter ) and d (for ) (for
oneapi::mkl::rng::poisson_method::ptpe
)
Poisson distribution
i
d
Poisson distribution with varying mean
i
d
Negative binomial distribution, or Pascal distribution
i
CPU - s GPU - d
Multinomial distribution

## Modes of Random Number Generation

The library provides two modes of random number generation, accurate and fast. Accurate generation mode is intended for the applications that are highly demanding to accuracy of calculations. When used in this mode, the generators produce random numbers lying completely within definitional domain for all values of the distribution parameters. For example, random numbers obtained from the generator of continuous distribution that is uniform on interval [
a
,
b
] belong to this interval irrespective of what
a
and
b
values may be. Fast mode provides high performance of generation and also guarantees that generated random numbers belong to the definitional domain except for some specific values of distribution parameters. The generation mode is set by specifying relevant value of the method parameter in generator routines. List of distributions that support accurate mode of generation is given in the table below.
Distribution
Distribution Method
oneapi::mkl::rng::unform_method::accurate
oneapi::mkl::rng::exponential_method::icdf_accurate
oneapi::mkl::rng::weibull_method::icdf_accurate
oneapi::mkl::rng::rayleigh_method::icdf_accurate
oneapi::mkl::rng::lognormal_method::icdf_accurate
oneapi::mkl::rng::lognormal_method::box_muller2_accurate
oneapi::mkl::rng::gamma_method::marsaglia_accurate
oneapi::mkl::rng::beta_method::cja_accurate

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.