diff options
Diffstat (limited to 'tensorflow/core/kernels/cwise_ops.h')
-rw-r--r-- | tensorflow/core/kernels/cwise_ops.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/cwise_ops.h b/tensorflow/core/kernels/cwise_ops.h index 6c22b124de..d32185b6bf 100644 --- a/tensorflow/core/kernels/cwise_ops.h +++ b/tensorflow/core/kernels/cwise_ops.h @@ -49,7 +49,11 @@ template <typename T> struct scalar_asinh_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_asinh_op) EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T operator()(const T& a) const { +#if EIGEN_HAS_CXX11_MATH + return numext::asinh(a); +#else return std::asinh(a); +#endif // EIGEN_HAS_CXX11_MATH } }; template <typename T> @@ -61,7 +65,11 @@ template <typename T> struct scalar_acosh_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_acosh_op) EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T operator()(const T& a) const { +#if EIGEN_HAS_CXX11_MATH + return numext::acosh(a); +#else return std::acosh(a); +#endif // EIGEN_HAS_CXX11_MATH } }; template <typename T> @@ -73,7 +81,11 @@ template <typename T> struct scalar_atanh_op { EIGEN_EMPTY_STRUCT_CTOR(scalar_atanh_op) EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const T operator()(const T& a) const { +#if EIGEN_HAS_CXX11_MATH + return numext::atanh(a); +#else return std::atanh(a); +#endif // EIGEN_HAS_CXX11_MATH } }; template <typename T> |