ONE - On-device Neural Engine
Loading...
Searching...
No Matches
fp32.h File Reference

This file contains functions to compare float values. More...

#include <cmath>
#include <cfloat>
#include <algorithm>
#include <cstdint>

Go to the source code of this file.

Namespaces

namespace  nnfw
 
namespace  nnfw::misc
 
namespace  nnfw::misc::fp32
 

Functions

float nnfw::misc::fp32::relative_diff (float lhs, float rhs)
 Get the difference between two float values as a relative value.
 
bool nnfw::misc::fp32::epsilon_equal (float expected, float obtained, uint32_t tolerance=1)
 Verify that an obtained float value is equal to the expected float value by using FLT_EPSILON.
 
bool nnfw::misc::fp32::absolute_epsilon_equal (float expected, float obtained, float tolerance=0.001)
 Verify that an obtained float value is equal to the expected float value by comparing absolute tolerance value.
 

Detailed Description

This file contains functions to compare float values.

Definition in file fp32.h.