poisson_distribution< IntType > Class Template Reference

poisson_distribution&lt; IntType &gt; Class Template Reference#

API library: rocrand_cpp::poisson_distribution< IntType > Class Template Reference
rocrand_cpp::poisson_distribution< IntType > Class Template Reference

Produces random non-negative integer values distributed according to Poisson distribution. More...

#include <rocrand.hpp>

Classes

class  param_type
 The type of the distribution parameter set. More...
 

Public Types

typedef IntType result_type
 See description for IntType template parameter.
 

Public Member Functions

 poisson_distribution (double mean=1.0)
 Constructs a new distribution object. More...
 
 poisson_distribution (const param_type &params)
 Constructs a new distribution object. More...
 
double mean () const
 Returns the mean distribution parameter. More...
 
param_type param ()
 Returns the distribution parameter object.
 
void param (const param_type &params)
 Sets the distribution parameter object.
 
template<class Generator >
void operator() (Generator &g, IntType *output, size_t size)
 Fills output with random non-negative integer values distributed according to Poisson distribution. More...
 
bool operator== (const poisson_distribution< IntType > &other) const
 Returns true if the distribution is the same as other. More...
 
bool operator!= (const poisson_distribution< IntType > &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.
 
static constexpr IntType min ()
 Returns the smallest possible value that can be generated.
 
static constexpr IntType max ()
 Returns the largest possible value that can be generated.
 

Detailed Description

template<class IntType = unsigned int>
class rocrand_cpp::poisson_distribution< IntType >

Produces random non-negative integer values distributed according to Poisson distribution.

Template Parameters
IntType- type of generated values. Only unsinged int type is supported.

Constructor & Destructor Documentation

◆ poisson_distribution() [1/2]

template<class IntType = unsigned int>
rocrand_cpp::poisson_distribution< IntType >::poisson_distribution ( double  mean = 1.0)
inline

Constructs a new distribution object.

Parameters
mean- A mean distribution parameter.

◆ poisson_distribution() [2/2]

template<class IntType = unsigned int>
rocrand_cpp::poisson_distribution< IntType >::poisson_distribution ( const param_type params)
inlineexplicit

Constructs a new distribution object.

Parameters
params- Distribution parameters

Member Function Documentation

◆ mean()

template<class IntType = unsigned int>
double rocrand_cpp::poisson_distribution< IntType >::mean ( ) const
inline

Returns the mean distribution parameter.

The mean (also known as lambda) is the average number of events per interval. The default value is 1.0.

◆ operator!=()

template<class IntType = unsigned int>
bool rocrand_cpp::poisson_distribution< IntType >::operator!= ( const poisson_distribution< IntType > &  other) const
inline

Returns true if the distribution is different from other.

Two distribution are equal, if their parameters are equal.

◆ operator()()

template<class IntType = unsigned int>
template<class Generator >
void rocrand_cpp::poisson_distribution< IntType >::operator() ( Generator &  g,
IntType *  output,
size_t  size 
)
inline

Fills output with random non-negative integer values distributed according to Poisson distribution.

Generates size random non-negative integer values distributed according to Poisson 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 least size values of IntType type.
  • If generator g is a quasi-random number generator (rocrand_cpp::sobol32_engine), then size must be a multiple of that generator's dimension.

See also: rocrand_generate_poisson()

◆ operator==()

template<class IntType = unsigned int>
bool rocrand_cpp::poisson_distribution< IntType >::operator== ( const poisson_distribution< IntType > &  other) const
inline

Returns true if the distribution is the same as other.

Two distribution are equal, if their parameters are equal.


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.3.1/library/include/rocrand/rocrand.hpp