diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-11-01 15:34:19 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-11-01 15:34:19 -0700 |
commit | b730952414b19b988abae2a2ba2be86fb13cff88 (patch) | |
tree | c0f56a9686207b116ada33d98134a26e9cce54f3 /unsupported/Eigen/src/SpecialFunctions | |
parent | 2ebb314fa7a08534a6a5b7fc8df1667a439106fe (diff) |
Don't attempts to use lgamma_r for CUDA devices.
Fix type in lgamma_impl<double>.
Diffstat (limited to 'unsupported/Eigen/src/SpecialFunctions')
-rw-r--r-- | unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h b/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h index 29d3ecb07..f3f2c78a3 100644 --- a/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h +++ b/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h @@ -121,7 +121,7 @@ template <> struct lgamma_impl<float> { EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE float run(float x) { -#ifdef _BSD_SOURCE || _SVID_SOURCE +#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) int signgam; return ::lgammaf_r(x, &signgam); #else @@ -134,9 +134,9 @@ template <> struct lgamma_impl<double> { EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE double run(double x) { -#ifdef _BSD_SOURCE || _SVID_SOURCE +#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) int signgam; - return ::lgammaf_r(x, &signgam); + return ::lgamma_r(x, &signgam); #else return ::lgamma(x); #endif |