aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/src/SpecialFunctions
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-02 09:55:39 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-11-02 09:55:39 -0700
commite6e77ed08b56d3820bcda05056a8fff5e0ec9cb0 (patch)
tree6831a8a615d05cb9941e352984167bf96e4bf9af /unsupported/Eigen/src/SpecialFunctions
parentb238f387b46f2451a77592b10e58785e8c808dcd (diff)
Don't call lgamma_r when compiling for an Apple device, since the function isn't available on MacOS
Diffstat (limited to 'unsupported/Eigen/src/SpecialFunctions')
-rw-r--r--unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h b/unsupported/Eigen/src/SpecialFunctions/SpecialFunctionsImpl.h
index f3f2c78a3..f524d7137 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) {
-#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE))
+#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) && !defined(__APPLE__)
int signgam;
return ::lgammaf_r(x, &signgam);
#else
@@ -134,7 +134,7 @@ template <>
struct lgamma_impl<double> {
EIGEN_DEVICE_FUNC
static EIGEN_STRONG_INLINE double run(double x) {
-#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE))
+#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE)) && !defined(__APPLE__)
int signgam;
return ::lgamma_r(x, &signgam);
#else