mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Fix erf in c++03
This commit is contained in:
parent
71d5bedf72
commit
0c845e28c9
@ -1579,12 +1579,18 @@ template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
|||||||
double tanh(const double &x) { return ::tanh(x); }
|
double tanh(const double &x) { return ::tanh(x); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if EIGEN_HAS_CXX11
|
||||||
template<typename T>
|
template<typename T>
|
||||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
T erf(const T &x) {
|
T erf(const T &x) {
|
||||||
EIGEN_USING_STD_MATH(erf);
|
EIGEN_USING_STD_MATH(erf);
|
||||||
return erf(x);
|
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)
|
#if (!defined(EIGEN_GPUCC)) && EIGEN_FAST_MATH && !defined(SYCL_DEVICE_ONLY)
|
||||||
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
|
||||||
|
Loading…
Reference in New Issue
Block a user