mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Update ADOL-C support.
This commit is contained in:
parent
6fcd316f23
commit
fd727249ad
@ -25,7 +25,7 @@
|
|||||||
#ifndef NUMBER_DIRECTIONS
|
#ifndef NUMBER_DIRECTIONS
|
||||||
# define NUMBER_DIRECTIONS 2
|
# define NUMBER_DIRECTIONS 2
|
||||||
#endif
|
#endif
|
||||||
#include <adolc/adouble.h>
|
#include <adolc/adtl.h>
|
||||||
|
|
||||||
// adolc defines some very stupid macros:
|
// adolc defines some very stupid macros:
|
||||||
#if defined(malloc)
|
#if defined(malloc)
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
#define NUMBER_DIRECTIONS 16
|
#define NUMBER_DIRECTIONS 16
|
||||||
#include <unsupported/Eigen/AdolcForward>
|
#include <unsupported/Eigen/AdolcForward>
|
||||||
|
|
||||||
int adtl::ADOLC_numDir;
|
|
||||||
|
|
||||||
template<typename Vector>
|
template<typename Vector>
|
||||||
EIGEN_DONT_INLINE typename Vector::Scalar foo(const Vector& p)
|
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()
|
void test_forward_adolc()
|
||||||
{
|
{
|
||||||
adtl::ADOLC_numDir = NUMBER_DIRECTIONS;
|
adtl::setNumDir(NUMBER_DIRECTIONS);
|
||||||
|
|
||||||
for(int i = 0; i < g_repeat; i++) {
|
for(int i = 0; i < g_repeat; i++) {
|
||||||
CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,2,2>()) ));
|
CALL_SUBTEST(( adolc_forward_jacobian(TestFunc1<double,2,2>()) ));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user