lognormal_distribution< RealType > Class Template Reference#
API library
|
Produces positive random numbers according to a log-normal distribution. More...
#include <rocrand.hpp>
Classes | |
class | param_type |
The type of the distribution parameter set. More... | |
Public Types | |
typedef RealType | result_type |
See description for RealType template parameter. | |
Public Member Functions | |
lognormal_distribution (RealType m=0.0, RealType s=1.0) | |
Constructs a new distribution object. More... | |
lognormal_distribution (const param_type ¶ms) | |
Constructs a new distribution object. More... | |
RealType | m () const |
Returns the mean distribution parameter. More... | |
RealType | s () const |
Returns the standard deviation distribution parameter. More... | |
param_type | param () const |
Returns the distribution parameter object. | |
void | param (const param_type ¶ms) |
Sets the distribution parameter object. | |
RealType | min () const |
Returns the smallest possible value that can be generated. | |
RealType | max () const |
Returns the largest possible value that can be generated. | |
template<class Generator > | |
void | operator() (Generator &g, RealType *output, size_t size) |
Fills output with log-normally distributed random floating-point values. More... | |
bool | operator== (const lognormal_distribution< RealType > &other) const |
Returns true if the distribution is the same as other . More... | |
bool | operator!= (const lognormal_distribution< RealType > &other) const |
Returns true if the distribution is different from other . More... | |
Static Public Member Functions | |
static void | reset () |
Resets distribution's internal state if there is any. | |
Detailed Description
template<class RealType = float>
class rocrand_cpp::lognormal_distribution< RealType >
Produces positive random numbers according to a log-normal distribution.
- Template Parameters
-
RealType - type of generated values. Only float
,double
andhalf
types are supported.
Constructor & Destructor Documentation
◆ lognormal_distribution() [1/2]
|
inline |
Constructs a new distribution object.
- Parameters
-
m - A mean distribution parameter s - A standard deviation distribution parameter
◆ lognormal_distribution() [2/2]
|
inlineexplicit |
Constructs a new distribution object.
- Parameters
-
params - Distribution parameters
Member Function Documentation
◆ m()
|
inline |
Returns the mean distribution parameter.
The mean specifies the location of the peak. The default value is 0.0.
◆ operator!=()
|
inline |
Returns true
if the distribution is different from other
.
Two distribution are equal, if their parameters are equal.
◆ operator()()
|
inline |
Fills output
with log-normally distributed random floating-point values.
Generates size
random floating-point values (greater than zero) distributed according to a log-normal distribution, and stores them into the device memory referenced by output
pointer.
- Parameters
-
g - An uniform random number generator object output - Pointer to device memory to store results size - Number of values to generate
Requirements:
- The device memory pointed by
output
must have been previously allocated and be large enough to store at leastsize
values ofRealType
type. - Pointer
output
must be aligned to2 * sizeof(RealType)
bytes. size
must be even.- If generator
g
is a quasi-random number generator (rocrand_cpp::sobol32_engine
), thensize
must be a multiple of that generator's dimension.
See also: rocrand_generate_log_normal(), rocrand_generate_log_normal_double()
◆ operator==()
|
inline |
Returns true
if the distribution is the same as other
.
Two distribution are equal, if their parameters are equal.
◆ s()
|
inline |
Returns the standard deviation distribution parameter.
The default value is 1.0.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocrand/checkouts/docs-6.1.1/library/include/rocrand/rocrand.hpp
Generated by 1.9.1