Update ADOL-C support.

This commit is contained in:
Gael Guennebaud 2015-11-30 16:00:22 +01:00
parent 6fcd316f23
commit fd727249ad
2 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,7 @@
#ifndef NUMBER_DIRECTIONS
# define NUMBER_DIRECTIONS 2
#endif
#include <adolc/adouble.h>
#include <adolc/adtl.h>
// adolc defines some very stupid macros:
#if defined(malloc)

View File

@ -13,8 +13,6 @@
#define NUMBER_DIRECTIONS 16
#include <unsupported/Eigen/AdolcForward>
int adtl::ADOLC_numDir;
template<typename Vector>
EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)
{
@ -123,7 +121,7 @@ template<typename Func> 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<double,2,2>()) ));