Fix erf in c++03

This commit is contained in:
Eugene Zhulenev 2019-09-25 11:31:45 -07:00
parent 71d5bedf72
commit 0c845e28c9

View File

@ -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