Compute Library
uniform_real_distribution_16bit< T > Class Template Reference

Specialized class to generate random non-zero FP16 values. More...

#include <Utils.h>

Public Types

using result_type = T

Public Member Functions

 uniform_real_distribution_16bit (float min=0.f, float max=1.0)
 Constructor. More...
operator() (std::mt19937 &gen)
 () operator to generate next value More...

Detailed Description

template<typename T>
class arm_compute::utils::uniform_real_distribution_16bit< T >

Specialized class to generate random non-zero FP16 values.

uniform_real_distribution<half> generates values that get rounded off to zero, causing differences between ACL and reference implementation

Definition at line 298 of file Utils.h.

Member Typedef Documentation

◆ result_type

using result_type = T

Definition at line 303 of file Utils.h.

Constructor & Destructor Documentation

◆ uniform_real_distribution_16bit()

uniform_real_distribution_16bit ( float  min = 0.f,
float  max = 1.0 


[in]minMinimum value of the distribution
[in]maxMaximum value of the distribution

Definition at line 309 of file Utils.h.

310  : dist(min, max)
311  {
312  }

Member Function Documentation

◆ operator()()

T operator() ( std::mt19937 &  gen)

() operator to generate next value

[in]genan uniform random bit generator object

Definition at line 318 of file Utils.h.

319  {
320  return T(dist(gen));
321  }

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