diff options
author | Eric Christopher <echristo@gmail.com> | 2016-02-12 02:22:53 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2016-02-12 02:22:53 +0000 |
commit | 39a84d0b9bd4865ea01e8c6d6c99d8f9d294da81 (patch) | |
tree | d964cf210e28817d097bfdb3028e0ff9aa608539 /clang/lib/Headers/__clang_cuda_cmath.h | |
parent | 16f7bcb661b9c1ab952f800321223056c6807359 (diff) | |
download | bcm5719-llvm-39a84d0b9bd4865ea01e8c6d6c99d8f9d294da81.tar.gz bcm5719-llvm-39a84d0b9bd4865ea01e8c6d6c99d8f9d294da81.zip |
Update functions in clang supplied headers to use the compiler reserved
namespace for arguments.
llvm-svn: 260647
Diffstat (limited to 'clang/lib/Headers/__clang_cuda_cmath.h')
-rw-r--r-- | clang/lib/Headers/__clang_cuda_cmath.h | 148 |
1 files changed, 81 insertions, 67 deletions
diff --git a/clang/lib/Headers/__clang_cuda_cmath.h b/clang/lib/Headers/__clang_cuda_cmath.h index 74840f03932..917b6851e6e 100644 --- a/clang/lib/Headers/__clang_cuda_cmath.h +++ b/clang/lib/Headers/__clang_cuda_cmath.h @@ -34,146 +34,160 @@ #define __DEVICE__ static __device__ __inline__ __attribute__((always_inline)) namespace std { -__DEVICE__ long long abs(long long n) { return ::llabs(n); } -__DEVICE__ long abs(long n) { return ::labs(n); } +__DEVICE__ long long abs(long long __n) { return ::llabs(__n); } +__DEVICE__ long abs(long __n) { return ::labs(__n); } using ::abs; -__DEVICE__ float abs(float x) { return ::fabsf(x); } -__DEVICE__ double abs(double x) { return ::fabs(x); } -__DEVICE__ float acos(float x) { return ::acosf(x); } +__DEVICE__ float abs(float __x) { return ::fabsf(__x); } +__DEVICE__ double abs(double __x) { return ::fabs(__x); } +__DEVICE__ float acos(float __x) { return ::acosf(__x); } using ::acos; using ::acosh; -__DEVICE__ float asin(float x) { return ::asinf(x); } +__DEVICE__ float asin(float __x) { return ::asinf(__x); } using ::asin; using ::asinh; -__DEVICE__ float atan(float x) { return ::atanf(x); } +__DEVICE__ float atan(float __x) { return ::atanf(__x); } using ::atan; -__DEVICE__ float atan2(float x, float y) { return ::atan2f(x, y); } +__DEVICE__ float atan2(float __x, float __y) { return ::atan2f(__x, __y); } using ::atan2; using ::atanh; using ::cbrt; -__DEVICE__ float ceil(float x) { return ::ceilf(x); } +__DEVICE__ float ceil(float __x) { return ::ceilf(__x); } using ::ceil; using ::copysign; -__DEVICE__ float cos(float x) { return ::cosf(x); } +__DEVICE__ float cos(float __x) { return ::cosf(__x); } using ::cos; -__DEVICE__ float cosh(float x) { return ::coshf(x); } +__DEVICE__ float cosh(float __x) { return ::coshf(__x); } using ::cosh; using ::erf; using ::erfc; -__DEVICE__ float exp(float x) { return ::expf(x); } +__DEVICE__ float exp(float __x) { return ::expf(__x); } using ::exp; using ::exp2; using ::expm1; -__DEVICE__ float fabs(float x) { return ::fabsf(x); } +__DEVICE__ float fabs(float __x) { return ::fabsf(__x); } using ::fabs; using ::fdim; -__DEVICE__ float floor(float x) { return ::floorf(x); } +__DEVICE__ float floor(float __x) { return ::floorf(__x); } using ::floor; using ::fma; using ::fmax; using ::fmin; -__DEVICE__ float fmod(float x, float y) { return ::fmodf(x, y); } +__DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); } using ::fmod; -__DEVICE__ int fpclassify(float x) { +__DEVICE__ int fpclassify(float __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, - FP_ZERO, x); + FP_ZERO, __x); } -__DEVICE__ int fpclassify(double x) { +__DEVICE__ int fpclassify(double __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, - FP_ZERO, x); + FP_ZERO, __x); +} +__DEVICE__ float frexp(float __arg, int *__exp) { + return ::frexpf(__arg, __exp); } -__DEVICE__ float frexp(float arg, int *exp) { return ::frexpf(arg, exp); } using ::frexp; using ::hypot; using ::ilogb; -__DEVICE__ bool isfinite(float x) { return ::__finitef(x); } -__DEVICE__ bool isfinite(double x) { return ::__finite(x); } -__DEVICE__ bool isgreater(float x, float y) { - return __builtin_isgreater(x, y); +__DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } +__DEVICE__ bool isfinite(double __x) { return ::__finite(__x); } +__DEVICE__ bool isgreater(float __x, float __y) { + return __builtin_isgreater(__x, __y); +} +__DEVICE__ bool isgreater(double __x, double __y) { + return __builtin_isgreater(__x, __y); } -__DEVICE__ bool isgreater(double x, double y) { - return __builtin_isgreater(x, y); +__DEVICE__ bool isgreaterequal(float __x, float __y) { + return __builtin_isgreaterequal(__x, __y); } -__DEVICE__ bool isgreaterequal(float x, float y) { - return __builtin_isgreaterequal(x, y); +__DEVICE__ bool isgreaterequal(double __x, double __y) { + return __builtin_isgreaterequal(__x, __y); } -__DEVICE__ bool isgreaterequal(double x, double y) { - return __builtin_isgreaterequal(x, y); +__DEVICE__ bool isinf(float __x) { return ::__isinff(__x); } +__DEVICE__ bool isinf(double __x) { return ::__isinf(__x); } +__DEVICE__ bool isless(float __x, float __y) { + return __builtin_isless(__x, __y); } -__DEVICE__ bool isinf(float x) { return ::__isinff(x); } -__DEVICE__ bool isinf(double x) { return ::__isinf(x); } -__DEVICE__ bool isless(float x, float y) { return __builtin_isless(x, y); } -__DEVICE__ bool isless(double x, double y) { return __builtin_isless(x, y); } -__DEVICE__ bool islessequal(float x, float y) { - return __builtin_islessequal(x, y); +__DEVICE__ bool isless(double __x, double __y) { + return __builtin_isless(__x, __y); } -__DEVICE__ bool islessequal(double x, double y) { - return __builtin_islessequal(x, y); +__DEVICE__ bool islessequal(float __x, float __y) { + return __builtin_islessequal(__x, __y); } -__DEVICE__ bool islessgreater(float x, float y) { - return __builtin_islessgreater(x, y); +__DEVICE__ bool islessequal(double __x, double __y) { + return __builtin_islessequal(__x, __y); } -__DEVICE__ bool islessgreater(double x, double y) { - return __builtin_islessgreater(x, y); +__DEVICE__ bool islessgreater(float __x, float __y) { + return __builtin_islessgreater(__x, __y); } -__DEVICE__ bool isnan(float x) { return ::__isnanf(x); } -__DEVICE__ bool isnan(double x) { return ::__isnan(x); } -__DEVICE__ bool isnormal(float x) { return __builtin_isnormal(x); } -__DEVICE__ bool isnormal(double x) { return __builtin_isnormal(x); } -__DEVICE__ bool isunordered(float x, float y) { - return __builtin_isunordered(x, y); +__DEVICE__ bool islessgreater(double __x, double __y) { + return __builtin_islessgreater(__x, __y); } -__DEVICE__ bool isunordered(double x, double y) { - return __builtin_isunordered(x, y); +__DEVICE__ bool isnan(float __x) { return ::__isnanf(__x); } +__DEVICE__ bool isnan(double __x) { return ::__isnan(__x); } +__DEVICE__ bool isnormal(float __x) { return __builtin_isnormal(__x); } +__DEVICE__ bool isnormal(double __x) { return __builtin_isnormal(__x); } +__DEVICE__ bool isunordered(float __x, float __y) { + return __builtin_isunordered(__x, __y); +} +__DEVICE__ bool isunordered(double __x, double __y) { + return __builtin_isunordered(__x, __y); } using ::labs; -__DEVICE__ float ldexp(float arg, int exp) { return ::ldexpf(arg, exp); } +__DEVICE__ float ldexp(float __arg, int __exp) { + return ::ldexpf(__arg, __exp); +} using ::ldexp; using ::lgamma; using ::llabs; using ::llrint; -__DEVICE__ float log(float x) { return ::logf(x); } +__DEVICE__ float log(float __x) { return ::logf(__x); } using ::log; -__DEVICE__ float log10(float x) { return ::log10f(x); } +__DEVICE__ float log10(float __x) { return ::log10f(__x); } using ::log10; using ::log1p; using ::log2; using ::logb; using ::lrint; using ::lround; -__DEVICE__ float modf(float x, float *iptr) { return ::modff(x, iptr); } +__DEVICE__ float modf(float __x, float *__iptr) { return ::modff(__x, __iptr); } using ::modf; using ::nan; using ::nanf; using ::nearbyint; using ::nextafter; -__DEVICE__ float nexttoward(float from, float to) { +__DEVICE__ float nexttoward(float __from, float __to) { return __builtin_nexttowardf(from, to); } -__DEVICE__ double nexttoward(double from, double to) { - return __builtin_nexttoward(from, to); +__DEVICE__ double nexttoward(double __from, double __to) { + return __builtin_nexttoward(__from, __to); } using ::pow; -__DEVICE__ float pow(float base, float exp) { return ::powf(base, exp); } -__DEVICE__ float pow(float base, int iexp) { return ::powif(base, iexp); } -__DEVICE__ double pow(double base, int iexp) { return ::powi(base, iexp); } +__DEVICE__ float pow(float __base, float __exp) { + return ::powf(__base, __exp); +} +__DEVICE__ float pow(float __base, int __iexp) { + return ::powif(__base, __iexp); +} +__DEVICE__ double pow(double __base, int __iexp) { + return ::powi(__base, __iexp); +} using ::remainder; using ::remquo; using ::rint; using ::round; using ::scalbln; using ::scalbn; -__DEVICE__ bool signbit(float x) { return ::__signbitf(x); } -__DEVICE__ bool signbit(double x) { return ::__signbit(x); } -__DEVICE__ float sin(float x) { return ::sinf(x); } +__DEVICE__ bool signbit(float __x) { return ::__signbitf(__x); } +__DEVICE__ bool signbit(double __x) { return ::__signbit(__x); } +__DEVICE__ float sin(float __x) { return ::sinf(__x); } using ::sin; -__DEVICE__ float sinh(float x) { return ::sinhf(x); } +__DEVICE__ float sinh(float __x) { return ::sinhf(__x); } using ::sinh; -__DEVICE__ float sqrt(float x) { return ::sqrtf(x); } +__DEVICE__ float sqrt(float __x) { return ::sqrtf(__x); } using ::sqrt; -__DEVICE__ float tan(float x) { return ::tanf(x); } +__DEVICE__ float tan(float __x) { return ::tanf(__x); } using ::tan; -__DEVICE__ float tanh(float x) { return ::tanhf(x); } +__DEVICE__ float tanh(float __x) { return ::tanhf(__x); } using ::tanh; using ::tgamma; using ::trunc; |