diff options
author | steniu01 <steven.niu@arm.com> | 2017-06-22 10:20:37 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:14:20 +0100 |
commit | 423d88fb7e35333cd243fbe04a8558fd5ac1489f (patch) | |
tree | dbe88966905f42fcd15591a28fdc8a914d37cf51 /tests/validation/Validation.cpp | |
parent | 4cbee6e66f4425a3ab5bfac3bbf400e6818a224d (diff) | |
download | ComputeLibrary-423d88fb7e35333cd243fbe04a8558fd5ac1489f.tar.gz |
COMPMID-250 handle single float comparision
Change-Id: I0007dfba16952d427e73185d9c971e79e9f612c9
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/78507
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/validation/Validation.cpp')
-rw-r--r-- | tests/validation/Validation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/validation/Validation.cpp b/tests/validation/Validation.cpp index c1c43c05c4..89f91c0dd9 100644 --- a/tests/validation/Validation.cpp +++ b/tests/validation/Validation.cpp @@ -392,6 +392,16 @@ void validate(std::vector<unsigned int> classified_labels, std::vector<unsigned BOOST_TEST(classified_labels[i] == expected_labels[i]); } } + +void validate(float target, float ref, float tolerance_abs_error = std::numeric_limits<float>::epsilon(), float tolerance_relative_error = 0.0001f) +{ + const bool equal = is_equal(target, ref, tolerance_abs_error, tolerance_relative_error); + + BOOST_TEST_INFO("reference = " << std::setprecision(5) << ref); + BOOST_TEST_INFO("target = " << std::setprecision(5) << target); + BOOST_TEST(equal); +} + } // namespace validation } // namespace test } // namespace arm_compute |