From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- ...selective_comparer_3_01_t_00_01false_01_4.xhtml | 175 +++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 20.02/struct_selective_comparer_3_01_t_00_01false_01_4.xhtml (limited to '20.02/struct_selective_comparer_3_01_t_00_01false_01_4.xhtml') diff --git a/20.02/struct_selective_comparer_3_01_t_00_01false_01_4.xhtml b/20.02/struct_selective_comparer_3_01_t_00_01false_01_4.xhtml new file mode 100644 index 0000000000..4c05073806 --- /dev/null +++ b/20.02/struct_selective_comparer_3_01_t_00_01false_01_4.xhtml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + +ArmNN: SelectiveComparer< T, false > Struct Template Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
SelectiveComparer< T, false > Struct Template Reference
+
+
+ +

#include <TensorHelpers.hpp>

+ + + + +

+Static Public Member Functions

static bool Compare (T a, T b)
 
+

Detailed Description

+

template<typename T>
+struct SelectiveComparer< T, false >

+ + +

Definition at line 36 of file TensorHelpers.hpp.

+

Member Function Documentation

+ +

◆ Compare()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
static bool Compare (a,
b 
)
+
+inlinestatic
+
+ +

Definition at line 38 of file TensorHelpers.hpp.

+ +

References g_FloatCloseToZeroTolerance.

+
39  {
40  // If a or b is zero, percent_tolerance does an exact match, so compare to a small, constant tolerance instead.
41  if (a == 0.0f || b == 0.0f)
42  {
43  return std::abs(a - b) <= g_FloatCloseToZeroTolerance;
44  }
45 
46  if (std::isinf(a) && a == b)
47  {
48  return true;
49  }
50 
51  if (std::isnan(a) && std::isnan(b))
52  {
53  return true;
54  }
55 
56  // For unquantized floats we use a tolerance of 1%.
57  boost::math::fpc::close_at_tolerance<float> comparer(boost::math::fpc::percent_tolerance(1.0f));
58  return comparer(a, b);
59  }
constexpr float g_FloatCloseToZeroTolerance
+
+
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + -- cgit v1.2.1