ONE - On-device Neural Engine
Loading...
Searching...
No Matches
souschef::GaussianFloat32DataChef Class Referencefinal

Generate a sequence of random values according to the gaussian(=normal) distribution. More...

#include <Gaussian.h>

Collaboration diagram for souschef::GaussianFloat32DataChef:

Public Member Functions

 GaussianFloat32DataChef (float mean, float stddev)
 
std::vector< uint8_t > generate (int32_t count) const override
 Generate a sequence of 'count' elements as a byte sequence.
 
- Public Member Functions inherited from souschef::DataChef
virtual ~DataChef ()=default
 

Detailed Description

Generate a sequence of random values according to the gaussian(=normal) distribution.

Definition at line 28 of file Gaussian.h.

Constructor & Destructor Documentation

◆ GaussianFloat32DataChef()

souschef::GaussianFloat32DataChef::GaussianFloat32DataChef ( float  mean,
float  stddev 
)
inline

Definition at line 31 of file Gaussian.h.

31 : _mean{mean}, _stddev{stddev}
32 {
33 // DO NOTHING
34 }

Member Function Documentation

◆ generate()

std::vector< uint8_t > souschef::GaussianFloat32DataChef::generate ( int32_t  count) const
overridevirtual

Generate a sequence of 'count' elements as a byte sequence.

Let D be the return value of generate(N). Then, D.size() == N * sizeof(T) where T is the element type.

Implements souschef::DataChef.

Definition at line 70 of file Gaussian.cpp.

71{
72 return generate_gaussian<float>(count, _mean, _stddev);
73}

The documentation for this class was generated from the following files: