CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
Public Types | Public Member Functions | Public Attributes | List of all members
cutlass::Distribution Struct Reference

Distribution type.

#include <distribution.h>

Public Types

enum  Kind {
  Invalid, Uniform, Gaussian, Identity,
  Sequential
}
 Variant types. More...
 

Public Member Functions

 Distribution ()
 
Distributionset_uniform (double _min, double _max, int _int_scale=0)
 Configures distribution as uniform random. More...
 
Distributionset_gaussian (double _mean, double _stddev, int _int_scale=0)
 Configures distribution as Gaussian distribution. More...
 
Distributionset_identity ()
 Sets identity. More...
 
Distributionset_sequential (double start, double delta, int _int_scale=0)
 Sets sequential. More...
 

Public Attributes

union {
   struct {
      double   min
 
      double   max
 
   }   uniform
 Uniform distribution. More...
 
   struct {
      double   mean
 
      double   stddev
 
   }   gaussian
 Gaussian distribution. More...
 
   struct {
      double   start
 
      double   delta
 
   }   sequential
 Elements are linear combination of row and column index. More...
 
}; 
 Distribution state. More...
 
Kind kind
 Active variant kind. More...
 
int int_scale
 Random values are cast to integer after scaling by this power of two. More...
 

Member Enumeration Documentation

Enumerator
Invalid 
Uniform 
Gaussian 
Identity 
Sequential 

Constructor & Destructor Documentation

cutlass::Distribution::Distribution ( )
inline

Member Function Documentation

Distribution& cutlass::Distribution::set_gaussian ( double  _mean,
double  _stddev,
int  _int_scale = 0 
)
inline
Distribution& cutlass::Distribution::set_identity ( )
inline
Distribution& cutlass::Distribution::set_sequential ( double  start,
double  delta,
int  _int_scale = 0 
)
inline
Distribution& cutlass::Distribution::set_uniform ( double  _min,
double  _max,
int  _int_scale = 0 
)
inline

Member Data Documentation

union { ... }
double cutlass::Distribution::delta
struct { ... } cutlass::Distribution::gaussian
int cutlass::Distribution::int_scale
Kind cutlass::Distribution::kind
double cutlass::Distribution::max
double cutlass::Distribution::mean
double cutlass::Distribution::min
struct { ... } cutlass::Distribution::sequential
double cutlass::Distribution::start
double cutlass::Distribution::stddev
struct { ... } cutlass::Distribution::uniform

The documentation for this struct was generated from the following file: