From b055590e9135ffe762775ec919e490513b6974fa Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 16 Jun 2016 11:37:40 -0700 Subject: [PATCH] Made log1p_impl usable inside a GPU kernel --- Eigen/src/Core/MathFunctions.h | 4 ++-- 1 file 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::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::Real RealScalar; @@ -472,7 +472,7 @@ struct log1p_impl } }; -#if EIGEN_HAS_CXX11_MATH +#if EIGEN_HAS_CXX11_MATH && !defined(__CUDACC__) template struct log1p_impl { static inline Scalar run(const Scalar& x)