mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-21 05:43:21 +08:00
Don't attempts to use lgamma_r for CUDA devices.
Fix type in lgamma_impl<double>.
This commit is contained in:
parent
2ebb314fa7
commit
b730952414
@ -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) {
|
||||||
#ifdef _BSD_SOURCE || _SVID_SOURCE
|
#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE))
|
||||||
int signgam;
|
int signgam;
|
||||||
return ::lgammaf_r(x, &signgam);
|
return ::lgammaf_r(x, &signgam);
|
||||||
#else
|
#else
|
||||||
@ -134,9 +134,9 @@ 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) {
|
||||||
#ifdef _BSD_SOURCE || _SVID_SOURCE
|
#if !defined(__CUDA_ARCH__) && (defined(_BSD_SOURCE) || defined(_SVID_SOURCE))
|
||||||
int signgam;
|
int signgam;
|
||||||
return ::lgammaf_r(x, &signgam);
|
return ::lgamma_r(x, &signgam);
|
||||||
#else
|
#else
|
||||||
return ::lgamma(x);
|
return ::lgamma(x);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user