From 5e95ee66621471b807392158815135b5aa4651c1 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 26 Oct 2010 16:26:20 +0200 Subject: fix compilation and unit test of adolc --- unsupported/Eigen/AdolcForward | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'unsupported/Eigen/AdolcForward') diff --git a/unsupported/Eigen/AdolcForward b/unsupported/Eigen/AdolcForward index 1ecf98794..cb71fbcd6 100644 --- a/unsupported/Eigen/AdolcForward +++ b/unsupported/Eigen/AdolcForward @@ -82,21 +82,22 @@ namespace Eigen { // the Adolc's type adouble is defined in the adtl namespace // therefore, the following internal::* functions *must* be defined // in the same namespace -namespace adtl { +namespace Eigen { namespace internal { - inline const adouble& internal::conj(const adouble& x) { return x; } - inline const adouble& internal::real(const adouble& x) { return x; } - inline adouble internal::imag(const adouble&) { return 0.; } - inline adouble internal::abs(const adouble& x) { return fabs(x); } - inline adouble internal::abs2(const adouble& x) { return x*x; } - inline adouble internal::sqrt(const adouble& x) { return sqrt(x); } - inline adouble internal::exp(const adouble& x) { return exp(x); } - inline adouble internal::log(const adouble& x) { return log(x); } - inline adouble internal::sin(const adouble& x) { return sin(x); } - inline adouble internal::cos(const adouble& x) { return cos(x); } - inline adouble internal::pow(const adouble& x, adouble y) { return pow(x, y); } + inline const adtl::adouble& conj(const adtl::adouble& x) { return x; } + inline const adtl::adouble& real(const adtl::adouble& x) { return x; } + inline adtl::adouble imag(const adtl::adouble&) { return 0.; } + inline adtl::adouble abs(const adtl::adouble& x) { return adtl::fabs(x); } + inline adtl::adouble abs2(const adtl::adouble& x) { return x*x; } + + using adtl::sqrt; + using adtl::exp; + using adtl::log; + using adtl::sin; + using adtl::cos; + using adtl::pow; } -- cgit v1.2.3