From 0c845e28c918c4df8770aba213f1ae994b6b13df Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Wed, 25 Sep 2019 11:31:45 -0700 Subject: Fix erf in c++03 --- Eigen/src/Core/MathFunctions.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Eigen/src/Core/MathFunctions.h') diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 0d50fcd52..950ebec43 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -1579,12 +1579,18 @@ template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE double tanh(const double &x) { return ::tanh(x); } #endif +#if EIGEN_HAS_CXX11 template EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T erf(const T &x) { EIGEN_USING_STD_MATH(erf); return erf(x); } +#else +template +EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE +T erf(const T& x); +#endif #if (!defined(EIGEN_GPUCC)) && EIGEN_FAST_MATH && !defined(SYCL_DEVICE_ONLY) EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE -- cgit v1.2.3