Visible to Intel only — GUID: GUID-F67C286F-C91E-41FE-94A8-8EB769F8748C
Visible to Intel only — GUID: GUID-F67C286F-C91E-41FE-94A8-8EB769F8748C
oneapi::mkl::rng::device::lognormal
Generates lognormally distributed random numbers.
Description
The oneapi::mkl::rng::device::lognormal class object is used in the oneapi::mkl::rng::device::generate function to provide random numbers with average of distribution (m, a) and standard deviation (s, ) of subject normal distribution, displacement (displ, b), and scalefactor (scale, ), where .
The probability density function is given by:
The cumulative distribution function is as follows:
API
Syntax
template<typename RealType, typename Method> class lognormal { public: using method_type = Method; using result_type = RealType; lognormal() : lognormal((RealType)0.0, (RealType)1.0, (RealType) 0.0, (RealType)1.0){} explicit lognormal(RealType m, RealType s, RealType displ = (RealType)0.0, RealType scale = (RealType)1.0); explicit lognormal(const param_type& pt); RealType m() const; RealType s() const; RealType displ() const; RealType scale() const; param_type param() const; void param(const param_type& pt); };
Include Files
oneapi/mkl/rng/device.hpp
Template Parameters
typename RealType |
Type of the produced values. The specific values are as follows: float double |
typename Method |
Generation method. The specific values are as follows: oneapi::mkl::rng::device::lognormal_method::box_muller2 |
Note: To enable oneapi::mkl::rng::device::lognormal_method::box_muller2 based on Vector Math functions, define the MKL_RNG_USE_BINARY_CODE macro and link static oneMKL libraries according to the output produced by Intel® oneAPI Math Kernel Library Link Line Advisor. It may improve performance on some hardware.
Input Parameters
Name |
Type |
Description |
---|---|---|
m |
RealType (float, double) |
Average a of the subject normal distribution. |
s |
RealType (float, double) |
Standard deviation of the subject normal distribution. |
displ |
RealType (float, double) |
Displacement displ. |
scale |
RealType (float, double) |
Scalefactor scale. |