From fbba364350fcea447aaa6d108787820dea3fe23a Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Thu, 15 Oct 2020 13:53:27 +0100 Subject: 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 Change-Id: I164c32eccd213c53bb1bc4f9cd4ee4838f1781c9 --- src/armnn/test/TensorHelpers.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/armnn/test') 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 #include +#include #include #include #include #include -#include #include #include @@ -53,8 +53,7 @@ struct SelectiveComparer } // For unquantized floats we use a tolerance of 1%. - boost::math::fpc::close_at_tolerance comparer(boost::math::fpc::percent_tolerance(1.0f)); - return comparer(a, b); + return armnnUtils::within_percentage_tolerance(a, b); } }; -- cgit v1.2.1