diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-06-16 11:37:40 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-06-16 11:37:40 -0700 |
commit | b055590e9135ffe762775ec919e490513b6974fa (patch) | |
tree | 4839ad35b3d8e1e8f05be5ec0654126fe650a0bb /Eigen/src/Core/MathFunctions.h | |
parent | 7d495d890a865b38c8c561ad0c237c38f1239b11 (diff) |
Made log1p_impl usable inside a GPU kernel
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index ece04b754..342b47ced 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -462,7 +462,7 @@ struct arg_retval template<typename Scalar, bool isComplex = NumTraits<Scalar>::IsComplex > struct log1p_impl { - static inline Scalar run(const Scalar& x) + static EIGEN_DEVICE_FUNC inline Scalar run(const Scalar& x) { EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar) typedef typename NumTraits<Scalar>::Real RealScalar; @@ -472,7 +472,7 @@ struct log1p_impl } }; -#if EIGEN_HAS_CXX11_MATH +#if EIGEN_HAS_CXX11_MATH && !defined(__CUDACC__) template<typename Scalar> struct log1p_impl<Scalar, false> { static inline Scalar run(const Scalar& x) |