mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-12 14:25:16 +08:00
Add missing adolc isinf/isnan.
Also modified cmake/FindAdolc.cmake to eliminate warnings, and added search paths to match install layout. Fixed: #2157
This commit is contained in:
parent
ce4af0b38f
commit
5f9cfb2529
@ -4,17 +4,17 @@ if (ADOLC_INCLUDES AND ADOLC_LIBRARIES)
|
||||
endif ()
|
||||
|
||||
find_path(ADOLC_INCLUDES
|
||||
NAMES
|
||||
adolc/adtl.h
|
||||
PATHS
|
||||
$ENV{ADOLCDIR}
|
||||
${INCLUDE_INSTALL_DIR}
|
||||
NAMES adolc/adtl.h
|
||||
PATHS $ENV{ADOLCDIR} $ENV{ADOLCDIR}/include ${INCLUDE_INSTALL_DIR}
|
||||
)
|
||||
|
||||
find_library(ADOLC_LIBRARIES adolc PATHS $ENV{ADOLCDIR} ${LIB_INSTALL_DIR})
|
||||
find_library(ADOLC_LIBRARIES
|
||||
adolc
|
||||
PATHS $ENV{ADOLCDIR} ${LIB_INSTALL_DIR}
|
||||
PATH_SUFFIXES lib lib64)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(ADOLC DEFAULT_MSG
|
||||
find_package_handle_standard_args(Adolc DEFAULT_MSG
|
||||
ADOLC_INCLUDES ADOLC_LIBRARIES)
|
||||
|
||||
mark_as_advanced(ADOLC_INCLUDES ADOLC_LIBRARIES)
|
||||
|
@ -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 {
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user