From fd727249ada26896881d2f6905883f6ff9bbafe0 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 30 Nov 2015 16:00:22 +0100 Subject: [PATCH] Update ADOL-C support. --- unsupported/Eigen/AdolcForward | 2 +- unsupported/test/forward_adolc.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/unsupported/Eigen/AdolcForward b/unsupported/Eigen/AdolcForward index 2627decd0..15f5f0731 100644 --- a/unsupported/Eigen/AdolcForward +++ b/unsupported/Eigen/AdolcForward @@ -25,7 +25,7 @@ #ifndef NUMBER_DIRECTIONS # define NUMBER_DIRECTIONS 2 #endif -#include +#include // adolc defines some very stupid macros: #if defined(malloc) diff --git a/unsupported/test/forward_adolc.cpp b/unsupported/test/forward_adolc.cpp index d4baafe62..866db8e86 100644 --- a/unsupported/test/forward_adolc.cpp +++ b/unsupported/test/forward_adolc.cpp @@ -13,8 +13,6 @@ #define NUMBER_DIRECTIONS 16 #include -int adtl::ADOLC_numDir; - template EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p) { @@ -123,7 +121,7 @@ template void adolc_forward_jacobian(const Func& f) void test_forward_adolc() { - adtl::ADOLC_numDir = NUMBER_DIRECTIONS; + adtl::setNumDir(NUMBER_DIRECTIONS); for(int i = 0; i < g_repeat; i++) { CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1()) ));