mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-29 23:34:12 +08:00
Don't call lgamma_r when compiling for an Apple device, since the function isn't available on MacOS
This commit is contained in:
parent
b238f387b4
commit
e6e77ed08b
@ -121,7 +121,7 @@ template <>
|
|||||||
struct lgamma_impl<float> {
|
struct lgamma_impl<float> {
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static EIGEN_STRONG_INLINE float run(float x) {
|
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;
|
int signgam;
|
||||||
return ::lgammaf_r(x, &signgam);
|
return ::lgammaf_r(x, &signgam);
|
||||||
#else
|
#else
|
||||||
@ -134,7 +134,7 @@ template <>
|
|||||||
struct lgamma_impl<double> {
|
struct lgamma_impl<double> {
|
||||||
EIGEN_DEVICE_FUNC
|
EIGEN_DEVICE_FUNC
|
||||||
static EIGEN_STRONG_INLINE double run(double x) {
|
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;
|
int signgam;
|
||||||
return ::lgamma_r(x, &signgam);
|
return ::lgamma_r(x, &signgam);
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user