mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Update ADOL-C support.
This commit is contained in:
parent
6fcd316f23
commit
fd727249ad
@ -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)
|
||||
|
@ -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>()) ));
|
||||
|
Loading…
Reference in New Issue
Block a user