From 28c7c1a629c985c930d5f62f85fe79f235e9dc97 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Mon, 7 Mar 2022 19:06:27 +0000 Subject: [PATCH] Log position of first difference for easier debugging. --- test/packetmath_test_shared.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/packetmath_test_shared.h b/test/packetmath_test_shared.h index 709c4ae43..6fc489f47 100644 --- a/test/packetmath_test_shared.h +++ b/test/packetmath_test_shared.h @@ -90,6 +90,7 @@ template bool areApproxAbs(const Scalar* a, const Scalar* b, in if (!isApproxAbs(a[i],b[i],refvalue)) { print_mismatch(a, b, size); + std::cout << "Values differ in position " << i << ": " << a[i] << " vs " << b[i] << std::endl; return false; } } @@ -104,6 +105,7 @@ template bool areApprox(const Scalar* a, const Scalar* b, int s && !((numext::isnan)(a[i]) && (numext::isnan)(b[i])) ) { print_mismatch(a, b, size); + std::cout << "Values differ in position " << i << ": " << a[i] << " vs " << b[i] << std::endl; return false; } } @@ -117,6 +119,7 @@ template bool areEqual(const Scalar* a, const Scalar* b, int si if ( numext::not_equal_strict(a[i], b[i]) && !((numext::isnan)(a[i]) && (numext::isnan)(b[i])) ) { print_mismatch(a, b, size); + std::cout << "Values differ in position " << i << ": " << a[i] << " vs " << b[i] << std::endl; return false; } }