aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/MathFunctions.h
diff options
context:
space:
mode:
authorGravatar Eugene Zhulenev <ezhulenev@google.com>2019-09-25 11:31:45 -0700
committerGravatar Eugene Zhulenev <ezhulenev@google.com>2019-09-25 11:31:45 -0700
commit0c845e28c918c4df8770aba213f1ae994b6b13df (patch)
tree250784c8a1250af54c4d872c9f1b652828a4a372 /Eigen/src/Core/MathFunctions.h
parent71d5bedf7224c4c2a2abb783a7cb5a60121b1ccb (diff)
Fix erf in c++03
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r--Eigen/src/Core/MathFunctions.h6
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