diff options
author | Eugene Zhulenev <ezhulenev@google.com> | 2019-09-25 11:31:45 -0700 |
---|---|---|
committer | Eugene Zhulenev <ezhulenev@google.com> | 2019-09-25 11:31:45 -0700 |
commit | 0c845e28c918c4df8770aba213f1ae994b6b13df (patch) | |
tree | 250784c8a1250af54c4d872c9f1b652828a4a372 | |
parent | 71d5bedf7224c4c2a2abb783a7cb5a60121b1ccb (diff) |
Fix erf in c++03
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 6 |
1 files changed, 6 insertions, 0 deletions
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<typename T> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T erf(const T &x) { EIGEN_USING_STD_MATH(erf); return erf(x); } +#else +template<typename T> +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 |