From d4a727d0926fc6ff1f1aa309613eb9680ec2fab3 Mon Sep 17 00:00:00 2001 From: David Tellenbach Date: Fri, 14 Aug 2020 17:57:56 +0200 Subject: Disable min/max NaN propagation in test cxx11_tensor_expr The current pmin/pmax implementation for Arm Neon propagate NaNs differently than std::min/std::max. See issue https://gitlab.com/libeigen/eigen/-/issues/1937 --- unsupported/test/cxx11_tensor_expr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'unsupported') diff --git a/unsupported/test/cxx11_tensor_expr.cpp b/unsupported/test/cxx11_tensor_expr.cpp index 6dc44996a..b49663fe9 100644 --- a/unsupported/test/cxx11_tensor_expr.cpp +++ b/unsupported/test/cxx11_tensor_expr.cpp @@ -331,6 +331,7 @@ void test_minmax_nan_propagation_templ() { VERIFY((numext::isnan)(vec_res(i))); } + // Test that NaNs do not propagate if we reverse the arguments. vec_res = vec_zero.cwiseMin(kNan); for (int i = 0; i < size; ++i) { @@ -376,5 +377,10 @@ EIGEN_DECLARE_TEST(cxx11_tensor_expr) CALL_SUBTEST(test_type_casting()); CALL_SUBTEST(test_select()); CALL_SUBTEST(test_clip()); + +// Nan propagation does currently not work like one would expect from std::max/std::min, +// so we disable it for now +#if !EIGEN_ARCH_ARM_OR_ARM64 CALL_SUBTEST(test_minmax_nan_propagation()); +#endif } -- cgit v1.2.3