aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2020-10-15 13:53:27 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2020-10-16 09:43:58 +0100
commitfbba364350fcea447aaa6d108787820dea3fe23a (patch)
tree3fb1fc8e586b30ac031b6f2030600da695bd12c3 /src/armnn
parentf88e3cc93c0d20641b8dbb1cd3e019568502ba1d (diff)
downloadarmnn-fbba364350fcea447aaa6d108787820dea3fe23a.tar.gz
IVGCVSW-5435 Add FloatingPointComparison to remove boost::math::fpc uses
* Added FloatingPointComparison.hpp and FloatingPointComparisonTest.cpp, which compares two floats and returns true if the values are within a specified or default tolerance of each other. * Also removed boost::math::fpc from test/TensorHelpers.hpp to validate. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I164c32eccd213c53bb1bc4f9cd4ee4838f1781c9
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/test/TensorHelpers.hpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/armnn/test/TensorHelpers.hpp b/src/armnn/test/TensorHelpers.hpp
index d67cd5b979..fd9dd83770 100644
--- a/src/armnn/test/TensorHelpers.hpp
+++ b/src/armnn/test/TensorHelpers.hpp
@@ -6,13 +6,13 @@
#include <armnn/Tensor.hpp>
#include <armnn/utility/Assert.hpp>
+#include <armnnUtils/FloatingPointComparison.hpp>
#include <QuantizeHelper.hpp>
#include <boost/multi_array.hpp>
#include <boost/random/uniform_real_distribution.hpp>
#include <boost/random/mersenne_twister.hpp>
-#include <boost/test/tools/floating_point_comparison.hpp>
#include <boost/test/unit_test.hpp>
#include <array>
@@ -53,8 +53,7 @@ struct SelectiveComparer<T, false>
}
// For unquantized floats we use a tolerance of 1%.
- boost::math::fpc::close_at_tolerance<float> comparer(boost::math::fpc::percent_tolerance(1.0f));
- return comparer(a, b);
+ return armnnUtils::within_percentage_tolerance(a, b);
}
};