diff options
| author | Justin Lebar <jlebar@google.com> | 2016-11-18 00:41:35 +0000 |
|---|---|---|
| committer | Justin Lebar <jlebar@google.com> | 2016-11-18 00:41:35 +0000 |
| commit | 50fe9853495456f8cd01cef8c46fca4e9e084f58 (patch) | |
| tree | f68d82af3122b5de4b123124971cd5712bba9db1 /clang/lib/Headers/__clang_cuda_cmath.h | |
| parent | d14fe8830e16c5d17bbd9e277e69e8044097b00e (diff) | |
| download | bcm5719-llvm-50fe9853495456f8cd01cef8c46fca4e9e084f58.tar.gz bcm5719-llvm-50fe9853495456f8cd01cef8c46fca4e9e084f58.zip | |
[CUDA] Wrapper header changes necessary to support MacOS.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D26780
llvm-svn: 287288
Diffstat (limited to 'clang/lib/Headers/__clang_cuda_cmath.h')
| -rw-r--r-- | clang/lib/Headers/__clang_cuda_cmath.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Headers/__clang_cuda_cmath.h b/clang/lib/Headers/__clang_cuda_cmath.h index 569374584e4..0eaa08b30ca 100644 --- a/clang/lib/Headers/__clang_cuda_cmath.h +++ b/clang/lib/Headers/__clang_cuda_cmath.h @@ -75,7 +75,10 @@ __DEVICE__ float frexp(float __arg, int *__exp) { __DEVICE__ bool isinf(float __x) { return ::__isinff(__x); } __DEVICE__ bool isinf(double __x) { return ::__isinf(__x); } __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } -__DEVICE__ bool isfinite(double __x) { return ::__finite(__x); } +// For inscrutable reasons, __finite(), the double-precision version of +// __finitef, does not exist when compiling for MacOS. __isfinited is available +// everywhere and is just as good. +__DEVICE__ bool isfinite(double __x) { return ::__isfinited(__x); } __DEVICE__ bool isgreater(float __x, float __y) { return __builtin_isgreater(__x, __y); } @@ -141,7 +144,7 @@ __DEVICE__ double pow(double __base, int __iexp) { return ::powi(__base, __iexp); } __DEVICE__ bool signbit(float __x) { return ::__signbitf(__x); } -__DEVICE__ bool signbit(double __x) { return ::__signbit(__x); } +__DEVICE__ bool signbit(double __x) { return ::__signbitd(__x); } __DEVICE__ float sin(float __x) { return ::sinf(__x); } __DEVICE__ float sinh(float __x) { return ::sinhf(__x); } __DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); } |

