From 5f9cfb25294289730a78a2a3dcfbce3f36252422 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Fri, 19 Feb 2021 14:17:10 -0800 Subject: Add missing adolc isinf/isnan. Also modified cmake/FindAdolc.cmake to eliminate warnings, and added search paths to match install layout. Fixed: #2157 --- unsupported/Eigen/AdolcForward | 3 +++ unsupported/test/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'unsupported') diff --git a/unsupported/Eigen/AdolcForward b/unsupported/Eigen/AdolcForward index 9b8d3cd1a..56caeaebf 100644 --- a/unsupported/Eigen/AdolcForward +++ b/unsupported/Eigen/AdolcForward @@ -74,6 +74,9 @@ inline adouble imag(const adouble&) { return 0.; } inline adouble abs(const adouble& x) { return fabs(x); } inline adouble abs2(const adouble& x) { return x*x; } +inline bool (isinf)(const adouble& x) { return (Eigen::numext::isinf)(x.getValue()); } +inline bool (isnan)(const adouble& x) { return (Eigen::numext::isnan)(x.getValue()); } + } namespace Eigen { diff --git a/unsupported/test/CMakeLists.txt b/unsupported/test/CMakeLists.txt index 6bbcf50d5..34aa47d4a 100644 --- a/unsupported/test/CMakeLists.txt +++ b/unsupported/test/CMakeLists.txt @@ -23,7 +23,7 @@ endif() find_package(Adolc) -if(ADOLC_FOUND) +if(Adolc_FOUND) include_directories(${ADOLC_INCLUDES}) ei_add_property(EIGEN_TESTED_BACKENDS "Adolc, ") if(EIGEN_TEST_CXX11) -- cgit v1.2.3