clang 20.0.0git
__clang_cuda_math.h
Go to the documentation of this file.
1/*===---- __clang_cuda_math.h - Device-side CUDA math support --------------===
2 *
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 *
7 *===-----------------------------------------------------------------------===
8 */
9#ifndef __CLANG_CUDA_MATH_H__
10#define __CLANG_CUDA_MATH_H__
11#ifndef __CUDA__
12#error "This file is for CUDA compilation only."
13#endif
14
15// The __CLANG_GPU_DISABLE_MATH_WRAPPERS macro provides a way to let standard
16// libcalls reach the link step instead of being eagerly replaced.
17#ifndef __CLANG_GPU_DISABLE_MATH_WRAPPERS
18
19#ifndef __OPENMP_NVPTX__
20#if CUDA_VERSION < 9000
21#error This file is intended to be used with CUDA-9+ only.
22#endif
23#endif
24
25// __DEVICE__ is a helper macro with common set of attributes for the wrappers
26// we implement in this file. We need static in order to avoid emitting unused
27// functions and __forceinline__ helps inlining these wrappers at -O1.
28#pragma push_macro("__DEVICE__")
29#ifdef __OPENMP_NVPTX__
30#if defined(__cplusplus)
31#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow))
32#else
33#define __DEVICE__ static __attribute__((always_inline, nothrow))
34#endif
35#else
36#define __DEVICE__ static __device__ __forceinline__
37#endif
38
39// Specialized version of __DEVICE__ for functions with void return type. Needed
40// because the OpenMP overlay requires constexpr functions here but prior to
41// c++14 void return functions could not be constexpr.
42#pragma push_macro("__DEVICE_VOID__")
43#if defined(__OPENMP_NVPTX__) && defined(__cplusplus) && __cplusplus < 201402L
44#define __DEVICE_VOID__ static __attribute__((always_inline, nothrow))
45#else
46#define __DEVICE_VOID__ __DEVICE__
47#endif
48
49// libdevice provides fast low precision and slow full-recision implementations
50// for some functions. Which one gets selected depends on
51// __CLANG_CUDA_APPROX_TRANSCENDENTALS__ which gets defined by clang if
52// -ffast-math or -fgpu-approx-transcendentals are in effect.
53#pragma push_macro("__FAST_OR_SLOW")
54#if defined(__CLANG_GPU_APPROX_TRANSCENDENTALS__)
55#define __FAST_OR_SLOW(fast, slow) fast
56#else
57#define __FAST_OR_SLOW(fast, slow) slow
58#endif
59
60__DEVICE__ int abs(int __a) { return __nv_abs(__a); }
61__DEVICE__ double fabs(double __a) { return __nv_fabs(__a); }
62__DEVICE__ double acos(double __a) { return __nv_acos(__a); }
63__DEVICE__ float acosf(float __a) { return __nv_acosf(__a); }
64__DEVICE__ double acosh(double __a) { return __nv_acosh(__a); }
65__DEVICE__ float acoshf(float __a) { return __nv_acoshf(__a); }
66__DEVICE__ double asin(double __a) { return __nv_asin(__a); }
67__DEVICE__ float asinf(float __a) { return __nv_asinf(__a); }
68__DEVICE__ double asinh(double __a) { return __nv_asinh(__a); }
69__DEVICE__ float asinhf(float __a) { return __nv_asinhf(__a); }
70__DEVICE__ double atan(double __a) { return __nv_atan(__a); }
71__DEVICE__ double atan2(double __a, double __b) { return __nv_atan2(__a, __b); }
72__DEVICE__ float atan2f(float __a, float __b) { return __nv_atan2f(__a, __b); }
73__DEVICE__ float atanf(float __a) { return __nv_atanf(__a); }
74__DEVICE__ double atanh(double __a) { return __nv_atanh(__a); }
75__DEVICE__ float atanhf(float __a) { return __nv_atanhf(__a); }
76__DEVICE__ double cbrt(double __a) { return __nv_cbrt(__a); }
77__DEVICE__ float cbrtf(float __a) { return __nv_cbrtf(__a); }
78__DEVICE__ double ceil(double __a) { return __nv_ceil(__a); }
79__DEVICE__ float ceilf(float __a) { return __nv_ceilf(__a); }
80__DEVICE__ double copysign(double __a, double __b) {
81 return __nv_copysign(__a, __b);
82}
83__DEVICE__ float copysignf(float __a, float __b) {
84 return __nv_copysignf(__a, __b);
85}
86__DEVICE__ double cos(double __a) { return __nv_cos(__a); }
87__DEVICE__ float cosf(float __a) {
89}
90__DEVICE__ double cosh(double __a) { return __nv_cosh(__a); }
91__DEVICE__ float coshf(float __a) { return __nv_coshf(__a); }
92__DEVICE__ double cospi(double __a) { return __nv_cospi(__a); }
93__DEVICE__ float cospif(float __a) { return __nv_cospif(__a); }
98__DEVICE__ double erf(double __a) { return __nv_erf(__a); }
99__DEVICE__ double erfc(double __a) { return __nv_erfc(__a); }
100__DEVICE__ float erfcf(float __a) { return __nv_erfcf(__a); }
101__DEVICE__ double erfcinv(double __a) { return __nv_erfcinv(__a); }
102__DEVICE__ float erfcinvf(float __a) { return __nv_erfcinvf(__a); }
103__DEVICE__ double erfcx(double __a) { return __nv_erfcx(__a); }
104__DEVICE__ float erfcxf(float __a) { return __nv_erfcxf(__a); }
105__DEVICE__ float erff(float __a) { return __nv_erff(__a); }
106__DEVICE__ double erfinv(double __a) { return __nv_erfinv(__a); }
107__DEVICE__ float erfinvf(float __a) { return __nv_erfinvf(__a); }
108__DEVICE__ double exp(double __a) { return __nv_exp(__a); }
109__DEVICE__ double exp10(double __a) { return __nv_exp10(__a); }
110__DEVICE__ float exp10f(float __a) { return __nv_exp10f(__a); }
111__DEVICE__ double exp2(double __a) { return __nv_exp2(__a); }
112__DEVICE__ float exp2f(float __a) { return __nv_exp2f(__a); }
113__DEVICE__ float expf(float __a) { return __nv_expf(__a); }
114__DEVICE__ double expm1(double __a) { return __nv_expm1(__a); }
115__DEVICE__ float expm1f(float __a) { return __nv_expm1f(__a); }
116__DEVICE__ float fabsf(float __a) { return __nv_fabsf(__a); }
117__DEVICE__ double fdim(double __a, double __b) { return __nv_fdim(__a, __b); }
118__DEVICE__ float fdimf(float __a, float __b) { return __nv_fdimf(__a, __b); }
119__DEVICE__ double fdivide(double __a, double __b) { return __a / __b; }
120__DEVICE__ float fdividef(float __a, float __b) {
121#if __FAST_MATH__ && !__CUDA_PREC_DIV
122 return __nv_fast_fdividef(__a, __b);
123#else
124 return __a / __b;
125#endif
126}
127__DEVICE__ double floor(double __f) { return __nv_floor(__f); }
128__DEVICE__ float floorf(float __f) { return __nv_floorf(__f); }
129__DEVICE__ double fma(double __a, double __b, double __c) {
130 return __nv_fma(__a, __b, __c);
131}
132__DEVICE__ float fmaf(float __a, float __b, float __c) {
133 return __nv_fmaf(__a, __b, __c);
134}
135__DEVICE__ double fmax(double __a, double __b) { return __nv_fmax(__a, __b); }
136__DEVICE__ float fmaxf(float __a, float __b) { return __nv_fmaxf(__a, __b); }
137__DEVICE__ double fmin(double __a, double __b) { return __nv_fmin(__a, __b); }
138__DEVICE__ float fminf(float __a, float __b) { return __nv_fminf(__a, __b); }
139__DEVICE__ double fmod(double __a, double __b) { return __nv_fmod(__a, __b); }
140__DEVICE__ float fmodf(float __a, float __b) { return __nv_fmodf(__a, __b); }
141__DEVICE__ double frexp(double __a, int *__b) { return __nv_frexp(__a, __b); }
142__DEVICE__ float frexpf(float __a, int *__b) { return __nv_frexpf(__a, __b); }
143__DEVICE__ double hypot(double __a, double __b) { return __nv_hypot(__a, __b); }
144__DEVICE__ float hypotf(float __a, float __b) { return __nv_hypotf(__a, __b); }
145__DEVICE__ int ilogb(double __a) { return __nv_ilogb(__a); }
146__DEVICE__ int ilogbf(float __a) { return __nv_ilogbf(__a); }
147__DEVICE__ double j0(double __a) { return __nv_j0(__a); }
148__DEVICE__ float j0f(float __a) { return __nv_j0f(__a); }
149__DEVICE__ double j1(double __a) { return __nv_j1(__a); }
150__DEVICE__ float j1f(float __a) { return __nv_j1f(__a); }
151__DEVICE__ double jn(int __n, double __a) { return __nv_jn(__n, __a); }
152__DEVICE__ float jnf(int __n, float __a) { return __nv_jnf(__n, __a); }
153#if defined(__LP64__) || defined(_WIN64)
154__DEVICE__ long labs(long __a) { return __nv_llabs(__a); };
155#else
156__DEVICE__ long labs(long __a) { return __nv_abs(__a); };
157#endif
158__DEVICE__ double ldexp(double __a, int __b) { return __nv_ldexp(__a, __b); }
159__DEVICE__ float ldexpf(float __a, int __b) { return __nv_ldexpf(__a, __b); }
160__DEVICE__ double lgamma(double __a) { return __nv_lgamma(__a); }
161__DEVICE__ float lgammaf(float __a) { return __nv_lgammaf(__a); }
162__DEVICE__ long long llabs(long long __a) { return __nv_llabs(__a); }
163__DEVICE__ long long llmax(long long __a, long long __b) {
164 return __nv_llmax(__a, __b);
165}
166__DEVICE__ long long llmin(long long __a, long long __b) {
167 return __nv_llmin(__a, __b);
168}
169__DEVICE__ long long llrint(double __a) { return __nv_llrint(__a); }
170__DEVICE__ long long llrintf(float __a) { return __nv_llrintf(__a); }
171__DEVICE__ long long llround(double __a) { return __nv_llround(__a); }
172__DEVICE__ long long llroundf(float __a) { return __nv_llroundf(__a); }
173__DEVICE__ double round(double __a) { return __nv_round(__a); }
174__DEVICE__ float roundf(float __a) { return __nv_roundf(__a); }
175__DEVICE__ double log(double __a) { return __nv_log(__a); }
176__DEVICE__ double log10(double __a) { return __nv_log10(__a); }
177__DEVICE__ float log10f(float __a) { return __nv_log10f(__a); }
178__DEVICE__ double log1p(double __a) { return __nv_log1p(__a); }
179__DEVICE__ float log1pf(float __a) { return __nv_log1pf(__a); }
180__DEVICE__ double log2(double __a) { return __nv_log2(__a); }
181__DEVICE__ float log2f(float __a) {
183}
184__DEVICE__ double logb(double __a) { return __nv_logb(__a); }
185__DEVICE__ float logbf(float __a) { return __nv_logbf(__a); }
186__DEVICE__ float logf(float __a) {
188}
189#if defined(__LP64__) || defined(_WIN64)
190__DEVICE__ long lrint(double __a) { return llrint(__a); }
191__DEVICE__ long lrintf(float __a) { return __float2ll_rn(__a); }
192__DEVICE__ long lround(double __a) { return llround(__a); }
193__DEVICE__ long lroundf(float __a) { return llroundf(__a); }
194#else
195__DEVICE__ long lrint(double __a) { return (long)rint(__a); }
196__DEVICE__ long lrintf(float __a) { return __float2int_rn(__a); }
197__DEVICE__ long lround(double __a) { return round(__a); }
198__DEVICE__ long lroundf(float __a) { return roundf(__a); }
199#endif
200__DEVICE__ int max(int __a, int __b) { return __nv_max(__a, __b); }
201__DEVICE__ int min(int __a, int __b) { return __nv_min(__a, __b); }
202__DEVICE__ double modf(double __a, double *__b) { return __nv_modf(__a, __b); }
203__DEVICE__ float modff(float __a, float *__b) { return __nv_modff(__a, __b); }
204__DEVICE__ double nearbyint(double __a) { return __builtin_nearbyint(__a); }
205__DEVICE__ float nearbyintf(float __a) { return __builtin_nearbyintf(__a); }
206__DEVICE__ double nextafter(double __a, double __b) {
207 return __nv_nextafter(__a, __b);
208}
209__DEVICE__ float nextafterf(float __a, float __b) {
210 return __nv_nextafterf(__a, __b);
211}
212__DEVICE__ double norm(int __dim, const double *__t) {
213 return __nv_norm(__dim, __t);
214}
215__DEVICE__ double norm3d(double __a, double __b, double __c) {
216 return __nv_norm3d(__a, __b, __c);
217}
218__DEVICE__ float norm3df(float __a, float __b, float __c) {
219 return __nv_norm3df(__a, __b, __c);
220}
221__DEVICE__ double norm4d(double __a, double __b, double __c, double __d) {
222 return __nv_norm4d(__a, __b, __c, __d);
223}
224__DEVICE__ float norm4df(float __a, float __b, float __c, float __d) {
225 return __nv_norm4df(__a, __b, __c, __d);
226}
227__DEVICE__ double normcdf(double __a) { return __nv_normcdf(__a); }
228__DEVICE__ float normcdff(float __a) { return __nv_normcdff(__a); }
229__DEVICE__ double normcdfinv(double __a) { return __nv_normcdfinv(__a); }
231__DEVICE__ float normf(int __dim, const float *__t) {
232 return __nv_normf(__dim, __t);
233}
234__DEVICE__ double pow(double __a, double __b) { return __nv_pow(__a, __b); }
235__DEVICE__ float powf(float __a, float __b) { return __nv_powf(__a, __b); }
236__DEVICE__ double powi(double __a, int __b) { return __nv_powi(__a, __b); }
237__DEVICE__ float powif(float __a, int __b) { return __nv_powif(__a, __b); }
238__DEVICE__ double rcbrt(double __a) { return __nv_rcbrt(__a); }
239__DEVICE__ float rcbrtf(float __a) { return __nv_rcbrtf(__a); }
240__DEVICE__ double remainder(double __a, double __b) {
241 return __nv_remainder(__a, __b);
242}
243__DEVICE__ float remainderf(float __a, float __b) {
244 return __nv_remainderf(__a, __b);
245}
246__DEVICE__ double remquo(double __a, double __b, int *__c) {
247 return __nv_remquo(__a, __b, __c);
248}
249__DEVICE__ float remquof(float __a, float __b, int *__c) {
250 return __nv_remquof(__a, __b, __c);
251}
252__DEVICE__ double rhypot(double __a, double __b) {
253 return __nv_rhypot(__a, __b);
254}
255__DEVICE__ float rhypotf(float __a, float __b) {
256 return __nv_rhypotf(__a, __b);
257}
258// __nv_rint* in libdevice is buggy and produces incorrect results.
259__DEVICE__ double rint(double __a) { return __builtin_rint(__a); }
260__DEVICE__ float rintf(float __a) { return __builtin_rintf(__a); }
261__DEVICE__ double rnorm(int __a, const double *__b) {
262 return __nv_rnorm(__a, __b);
263}
264__DEVICE__ double rnorm3d(double __a, double __b, double __c) {
265 return __nv_rnorm3d(__a, __b, __c);
266}
267__DEVICE__ float rnorm3df(float __a, float __b, float __c) {
268 return __nv_rnorm3df(__a, __b, __c);
269}
270__DEVICE__ double rnorm4d(double __a, double __b, double __c, double __d) {
271 return __nv_rnorm4d(__a, __b, __c, __d);
272}
273__DEVICE__ float rnorm4df(float __a, float __b, float __c, float __d) {
274 return __nv_rnorm4df(__a, __b, __c, __d);
275}
276__DEVICE__ float rnormf(int __dim, const float *__t) {
277 return __nv_rnormf(__dim, __t);
278}
279__DEVICE__ double rsqrt(double __a) { return __nv_rsqrt(__a); }
280__DEVICE__ float rsqrtf(float __a) { return __nv_rsqrtf(__a); }
281__DEVICE__ double scalbn(double __a, int __b) { return __nv_scalbn(__a, __b); }
282__DEVICE__ float scalbnf(float __a, int __b) { return __nv_scalbnf(__a, __b); }
283__DEVICE__ double scalbln(double __a, long __b) {
284 if (__b > INT_MAX)
285 return __a > 0 ? HUGE_VAL : -HUGE_VAL;
286 if (__b < INT_MIN)
287 return __a > 0 ? 0.0 : -0.0;
288 return scalbn(__a, (int)__b);
289}
290__DEVICE__ float scalblnf(float __a, long __b) {
291 if (__b > INT_MAX)
292 return __a > 0 ? HUGE_VALF : -HUGE_VALF;
293 if (__b < INT_MIN)
294 return __a > 0 ? 0.f : -0.f;
295 return scalbnf(__a, (int)__b);
296}
297__DEVICE__ double sin(double __a) { return __nv_sin(__a); }
298__DEVICE_VOID__ void sincos(double __a, double *__s, double *__c) {
299 return __nv_sincos(__a, __s, __c);
300}
301__DEVICE_VOID__ void sincosf(float __a, float *__s, float *__c) {
303}
304__DEVICE_VOID__ void sincospi(double __a, double *__s, double *__c) {
305 return __nv_sincospi(__a, __s, __c);
306}
307__DEVICE_VOID__ void sincospif(float __a, float *__s, float *__c) {
308 return __nv_sincospif(__a, __s, __c);
309}
310__DEVICE__ float sinf(float __a) {
312}
313__DEVICE__ double sinh(double __a) { return __nv_sinh(__a); }
314__DEVICE__ float sinhf(float __a) { return __nv_sinhf(__a); }
315__DEVICE__ double sinpi(double __a) { return __nv_sinpi(__a); }
316__DEVICE__ float sinpif(float __a) { return __nv_sinpif(__a); }
317__DEVICE__ double sqrt(double __a) { return __nv_sqrt(__a); }
318__DEVICE__ float sqrtf(float __a) { return __nv_sqrtf(__a); }
319__DEVICE__ double tan(double __a) { return __nv_tan(__a); }
320__DEVICE__ float tanf(float __a) { return __nv_tanf(__a); }
321__DEVICE__ double tanh(double __a) { return __nv_tanh(__a); }
322__DEVICE__ float tanhf(float __a) { return __nv_tanhf(__a); }
323__DEVICE__ double tgamma(double __a) { return __nv_tgamma(__a); }
324__DEVICE__ float tgammaf(float __a) { return __nv_tgammaf(__a); }
325__DEVICE__ double trunc(double __a) { return __nv_trunc(__a); }
326__DEVICE__ float truncf(float __a) { return __nv_truncf(__a); }
327__DEVICE__ unsigned long long ullmax(unsigned long long __a,
328 unsigned long long __b) {
329 return __nv_ullmax(__a, __b);
330}
331__DEVICE__ unsigned long long ullmin(unsigned long long __a,
332 unsigned long long __b) {
333 return __nv_ullmin(__a, __b);
334}
335__DEVICE__ unsigned int umax(unsigned int __a, unsigned int __b) {
336 return __nv_umax(__a, __b);
337}
338__DEVICE__ unsigned int umin(unsigned int __a, unsigned int __b) {
339 return __nv_umin(__a, __b);
340}
341__DEVICE__ double y0(double __a) { return __nv_y0(__a); }
342__DEVICE__ float y0f(float __a) { return __nv_y0f(__a); }
343__DEVICE__ double y1(double __a) { return __nv_y1(__a); }
344__DEVICE__ float y1f(float __a) { return __nv_y1f(__a); }
345__DEVICE__ double yn(int __a, double __b) { return __nv_yn(__a, __b); }
346__DEVICE__ float ynf(int __a, float __b) { return __nv_ynf(__a, __b); }
347
348#pragma pop_macro("__DEVICE__")
349#pragma pop_macro("__DEVICE_VOID__")
350#pragma pop_macro("__FAST_OR_SLOW")
351
352#endif // __CLANG_GPU_DISABLE_MATH_WRAPPERS
353#endif // __CLANG_CUDA_MATH_H__
__DEVICE__ long long __float2ll_rn(float __a)
__DEVICE__ int __float2int_rn(float __a)
__DEVICE__ float __nv_tanhf(float __a)
__DEVICE__ long long __nv_llrint(double __a)
__DEVICE__ float __nv_expm1f(float __a)
__DEVICE__ double __nv_log(double __a)
__DEVICE__ double __nv_acosh(double __a)
__DEVICE__ double __nv_log2(double __a)
__DEVICE__ float __nv_nextafterf(float __a, float __b)
__DEVICE__ double __nv_remainder(double __a, double __b)
__DEVICE__ double __nv_sinpi(double __a)
__DEVICE__ float __nv_fabsf(float __a)
__DEVICE__ double __nv_fmod(double __a, double __b)
__DEVICE__ double __nv_erfcinv(double __a)
__DEVICE__ float __nv_exp10f(float __a)
__DEVICE__ double __nv_nextafter(double __a, double __b)
__DEVICE__ float __nv_y0f(float __a)
__DEVICE__ float __nv_j1f(float __a)
__DEVICE__ float __nv_fast_cosf(float __a)
__DEVICE__ double __nv_rhypot(double __a, double __b)
__DEVICE__ double __nv_rcbrt(double __a)
__DEVICE__ float __nv_fmodf(float __a, float __b)
__DEVICE__ float __nv_erfcinvf(float __a)
__DEVICE__ double __nv_log10(double __a)
__DEVICE__ double __nv_pow(double __a, double __b)
__DEVICE__ double __nv_asinh(double __a)
__DEVICE__ float __nv_ldexpf(float __a, int __b)
__DEVICE__ double __nv_tgamma(double __a)
__DEVICE__ float __nv_fmaf(float __a, float __b, float __c)
__DEVICE__ double __nv_normcdf(double __a)
__DEVICE__ double __nv_y0(double __a)
__DEVICE__ float __nv_rsqrtf(float __a)
__DEVICE__ unsigned long long __nv_ullmin(unsigned long long __a, unsigned long long __b)
__DEVICE__ double __nv_fma(double __a, double __b, double __c)
__DEVICE__ float __nv_log10f(float __a)
__DEVICE__ double __nv_rnorm(int __a, const double *__b)
__DEVICE__ float __nv_normcdff(float __a)
__DEVICE__ double __nv_erfc(double __a)
__DEVICE__ double __nv_sinh(double __a)
__DEVICE__ void __nv_sincospi(double __a, double *__b, double *__c)
__DEVICE__ float __nv_remainderf(float __a, float __b)
__DEVICE__ double __nv_logb(double __a)
__DEVICE__ float __nv_ceilf(float __a)
__DEVICE__ double __nv_lgamma(double __a)
__DEVICE__ float __nv_modff(float __a, float *__b)
__DEVICE__ float __nv_fdimf(float __a, float __b)
__DEVICE__ double __nv_erfcx(double __a)
__DEVICE__ float __nv_ynf(int __a, float __b)
__DEVICE__ double __nv_acos(double __a)
__DEVICE__ float __nv_hypotf(float __a, float __b)
__DEVICE__ int __nv_max(int __a, int __b)
__DEVICE__ double __nv_atan2(double __a, double __b)
__DEVICE__ unsigned long long __nv_ullmax(unsigned long long __a, unsigned long long __b)
__DEVICE__ double __nv_cosh(double __a)
__DEVICE__ float __nv_normf(int __a, const float *__b)
__DEVICE__ double __nv_cbrt(double __a)
__DEVICE__ double __nv_cospi(double __a)
__DEVICE__ double __nv_yn(int __a, double __b)
__DEVICE__ double __nv_copysign(double __a, double __b)
__DEVICE__ float __nv_fast_fdividef(float __a, float __b)
__DEVICE__ double __nv_j1(double __a)
__DEVICE__ double __nv_scalbn(double __a, int __b)
__DEVICE__ double __nv_fabs(double __a)
__DEVICE__ float __nv_log2f(float __a)
__DEVICE__ double __nv_exp10(double __a)
__DEVICE__ float __nv_floorf(float __a)
__DEVICE__ float __nv_erff(float __a)
__DEVICE__ float __nv_cbrtf(float __a)
__DEVICE__ double __nv_cyl_bessel_i1(double __a)
__DEVICE__ double __nv_cos(double __a)
__DEVICE__ float __nv_exp2f(float __a)
__DEVICE__ double __nv_j0(double __a)
__DEVICE__ float __nv_fast_log2f(float __a)
__DEVICE__ double __nv_floor(double __a)
__DEVICE__ float __nv_fminf(float __a, float __b)
__DEVICE__ double __nv_exp2(double __a)
__DEVICE__ double __nv_erfinv(double __a)
__DEVICE__ float __nv_roundf(float __a)
__DEVICE__ double __nv_erf(double __a)
__DEVICE__ double __nv_round(double __a)
__DEVICE__ float __nv_rnorm3df(float __a, float __b, float __c)
__DEVICE__ float __nv_norm4df(float __a, float __b, float __c, float __d)
__DEVICE__ long long __nv_llmax(long long __a, long long __b)
__DEVICE__ double __nv_ldexp(double __a, int __b)
__DEVICE__ double __nv_normcdfinv(double __a)
__DEVICE__ long long __nv_llmin(long long __a, long long __b)
__DEVICE__ float __nv_rcbrtf(float __a)
__DEVICE__ float __nv_erfcxf(float __a)
__DEVICE__ double __nv_atan(double __a)
__DEVICE__ double __nv_tan(double __a)
__DEVICE__ void __nv_fast_sincosf(float __a, float *__s, float *__c)
__DEVICE__ double __nv_tanh(double __a)
__DEVICE__ void __nv_sincospif(float __a, float *__b, float *__c)
__DEVICE__ float __nv_powf(float __a, float __b)
__DEVICE__ float __nv_lgammaf(float __a)
__DEVICE__ float __nv_cospif(float __a)
__DEVICE__ float __nv_cyl_bessel_i0f(float __a)
__DEVICE__ double __nv_rsqrt(double __a)
__DEVICE__ double __nv_atanh(double __a)
__DEVICE__ double __nv_rnorm3d(double __a, double __b, double __c)
__DEVICE__ float __nv_cyl_bessel_i1f(float __a)
__DEVICE__ float __nv_atan2f(float __a, float __b)
__DEVICE__ float __nv_jnf(int __a, float __b)
__DEVICE__ int __nv_abs(int __a)
__DEVICE__ double __nv_frexp(double __a, int *__b)
__DEVICE__ float __nv_sinpif(float __a)
__DEVICE__ double __nv_fmin(double __a, double __b)
__DEVICE__ double __nv_expm1(double __a)
__DEVICE__ double __nv_cyl_bessel_i0(double __a)
__DEVICE__ int __nv_min(int __a, int __b)
__DEVICE__ float __nv_erfcf(float __a)
__DEVICE__ double __nv_jn(int __a, double __b)
__DEVICE__ float __nv_fast_logf(float __a)
__DEVICE__ unsigned int __nv_umax(unsigned int __a, unsigned int __b)
__DEVICE__ float __nv_norm3df(float __a, float __b, float __c)
__DEVICE__ double __nv_modf(double __a, double *__b)
__DEVICE__ double __nv_sqrt(double __a)
__DEVICE__ double __nv_asin(double __a)
__DEVICE__ float __nv_asinhf(float __a)
__DEVICE__ float __nv_y1f(float __a)
__DEVICE__ double __nv_ceil(double __a)
__DEVICE__ int __nv_ilogb(double __a)
__DEVICE__ void __nv_sincosf(float __a, float *__b, float *__c)
__DEVICE__ float __nv_rnorm4df(float __a, float __b, float __c, float __d)
__DEVICE__ float __nv_asinf(float __a)
__DEVICE__ double __nv_exp(double __a)
__DEVICE__ float __nv_truncf(float __a)
__DEVICE__ float __nv_fmaxf(float __a, float __b)
__DEVICE__ float __nv_cosf(float __a)
__DEVICE__ long long __nv_llroundf(float __a)
__DEVICE__ float __nv_acoshf(float __a)
__DEVICE__ float __nv_sinf(float __a)
__DEVICE__ float __nv_atanhf(float __a)
__DEVICE__ void __nv_sincos(double __a, double *__b, double *__c)
__DEVICE__ float __nv_coshf(float __a)
__DEVICE__ double __nv_powi(double __a, int __b)
__DEVICE__ float __nv_log1pf(float __a)
__DEVICE__ long long __nv_llrintf(float __a)
__DEVICE__ float __nv_normcdfinvf(float __a)
__DEVICE__ float __nv_scalbnf(float __a, int __b)
__DEVICE__ float __nv_acosf(float __a)
__DEVICE__ double __nv_trunc(double __a)
__DEVICE__ float __nv_expf(float __a)
__DEVICE__ float __nv_rnormf(int __a, const float *__b)
__DEVICE__ float __nv_j0f(float __a)
__DEVICE__ float __nv_erfinvf(float __a)
__DEVICE__ double __nv_rnorm4d(double __a, double __b, double __c, double __d)
__DEVICE__ double __nv_norm4d(double __a, double __b, double __c, double __d)
__DEVICE__ double __nv_norm3d(double __a, double __b, double __c)
__DEVICE__ float __nv_logf(float __a)
__DEVICE__ float __nv_atanf(float __a)
__DEVICE__ float __nv_tanf(float __a)
__DEVICE__ double __nv_norm(int __a, const double *__b)
__DEVICE__ double __nv_log1p(double __a)
__DEVICE__ long long __nv_llabs(long long __a)
__DEVICE__ float __nv_tgammaf(float __a)
__DEVICE__ float __nv_sqrtf(float __a)
__DEVICE__ double __nv_hypot(double __a, double __b)
__DEVICE__ double __nv_y1(double __a)
__DEVICE__ float __nv_rhypotf(float __a, float __b)
__DEVICE__ float __nv_remquof(float __a, float __b, int *__c)
__DEVICE__ double __nv_sin(double __a)
__DEVICE__ double __nv_fdim(double __a, double __b)
__DEVICE__ double __nv_remquo(double __a, double __b, int *__c)
__DEVICE__ int __nv_ilogbf(float __a)
__DEVICE__ float __nv_sinhf(float __a)
__DEVICE__ unsigned int __nv_umin(unsigned int __a, unsigned int __b)
__DEVICE__ float __nv_copysignf(float __a, float __b)
__DEVICE__ float __nv_frexpf(float __a, int *__b)
__DEVICE__ float __nv_powif(float __a, int __b)
__DEVICE__ float __nv_logbf(float __a)
__DEVICE__ float __nv_fast_sinf(float __a)
__DEVICE__ double __nv_fmax(double __a, double __b)
__DEVICE__ long long __nv_llround(double __a)
__DEVICE__ float y0f(float __a)
__DEVICE__ double powi(double __a, int __b)
__DEVICE__ float fabsf(float __a)
__DEVICE__ double rhypot(double __a, double __b)
__DEVICE__ float fmodf(float __a, float __b)
__DEVICE__ double y1(double __a)
__DEVICE__ float remainderf(float __a, float __b)
__DEVICE__ float exp2f(float __a)
__DEVICE__ double j0(double __a)
__DEVICE__ float rsqrtf(float __a)
__DEVICE__ float acosf(float __a)
__DEVICE__ float fmaf(float __a, float __b, float __c)
__DEVICE__ float cbrtf(float __a)
__DEVICE__ float cyl_bessel_i1f(float __a)
__DEVICE__ float remquof(float __a, float __b, int *__c)
__DEVICE__ float tanf(float __a)
__DEVICE__ long labs(long __a)
__DEVICE__ float nextafterf(float __a, float __b)
__DEVICE__ float fmaxf(float __a, float __b)
__DEVICE__ long long llabs(long long __a)
__DEVICE__ float fminf(float __a, float __b)
__DEVICE__ float log2f(float __a)
__DEVICE_VOID__ void sincos(double __a, double *__s, double *__c)
__DEVICE__ double normcdf(double __a)
__DEVICE__ float norm3df(float __a, float __b, float __c)
__DEVICE__ float copysignf(float __a, float __b)
__DEVICE__ float truncf(float __a)
__DEVICE__ float fdimf(float __a, float __b)
__DEVICE_VOID__ void sincospi(double __a, double *__s, double *__c)
__DEVICE__ float rcbrtf(float __a)
__DEVICE__ long lrintf(float __a)
__DEVICE__ long long llrintf(float __a)
__DEVICE__ float j1f(float __a)
__DEVICE__ double erfinv(double __a)
__DEVICE__ float cosf(float __a)
__DEVICE__ double fdivide(double __a, double __b)
__DEVICE__ float ynf(int __a, float __b)
__DEVICE__ float sinf(float __a)
__DEVICE__ float erfcinvf(float __a)
__DEVICE__ float sinpif(float __a)
__DEVICE__ float logf(float __a)
__DEVICE__ int min(int __a, int __b)
__DEVICE__ float erfinvf(float __a)
__DEVICE__ float erff(float __a)
__DEVICE_VOID__ void sincospif(float __a, float *__s, float *__c)
__DEVICE__ float floorf(float __f)
__DEVICE__ float ceilf(float __a)
__DEVICE__ float nearbyintf(float __a)
__DEVICE__ float atanf(float __a)
__DEVICE__ float rnorm4df(float __a, float __b, float __c, float __d)
__DEVICE__ float atanhf(float __a)
__DEVICE__ long long llmin(long long __a, long long __b)
__DEVICE__ float tanhf(float __a)
__DEVICE__ double rnorm4d(double __a, double __b, double __c, double __d)
__DEVICE__ long long llmax(long long __a, long long __b)
__DEVICE__ float rhypotf(float __a, float __b)
#define __DEVICE__
__DEVICE__ double yn(int __a, double __b)
__DEVICE__ float exp10f(float __a)
__DEVICE__ float normf(int __dim, const float *__t)
__DEVICE__ double rcbrt(double __a)
__DEVICE__ float rintf(float __a)
__DEVICE__ float atan2f(float __a, float __b)
__DEVICE__ float sinhf(float __a)
__DEVICE__ unsigned long long ullmin(unsigned long long __a, unsigned long long __b)
__DEVICE__ double cyl_bessel_i1(double __a)
__DEVICE__ float acoshf(float __a)
__DEVICE__ unsigned long long ullmax(unsigned long long __a, unsigned long long __b)
__DEVICE__ double y0(double __a)
__DEVICE__ double cyl_bessel_i0(double __a)
__DEVICE__ float log10f(float __a)
__DEVICE__ int abs(int __a)
__DEVICE__ float ldexpf(float __a, int __b)
#define __FAST_OR_SLOW(fast, slow)
__DEVICE__ double norm(int __dim, const double *__t)
__DEVICE__ float normcdff(float __a)
__DEVICE__ double cospi(double __a)
__DEVICE__ double sinpi(double __a)
__DEVICE__ float modff(float __a, float *__b)
__DEVICE__ float erfcxf(float __a)
__DEVICE__ float logbf(float __a)
__DEVICE__ float normcdfinvf(float __a)
__DEVICE__ double normcdfinv(double __a)
__DEVICE__ float cyl_bessel_i0f(float __a)
__DEVICE__ float powif(float __a, int __b)
__DEVICE__ float coshf(float __a)
__DEVICE__ float asinhf(float __a)
__DEVICE__ float roundf(float __a)
__DEVICE__ long lroundf(float __a)
__DEVICE__ float norm4df(float __a, float __b, float __c, float __d)
__DEVICE__ float scalbnf(float __a, int __b)
__DEVICE__ double j1(double __a)
__DEVICE__ float erfcf(float __a)
__DEVICE__ double modf(double __a, double *__b)
__DEVICE__ int ilogbf(float __a)
__DEVICE__ double norm3d(double __a, double __b, double __c)
__DEVICE__ float powf(float __a, float __b)
__DEVICE__ double norm4d(double __a, double __b, double __c, double __d)
__DEVICE__ unsigned int umin(unsigned int __a, unsigned int __b)
__DEVICE__ float jnf(int __n, float __a)
__DEVICE__ float rnorm3df(float __a, float __b, float __c)
__DEVICE__ float cospif(float __a)
__DEVICE__ float frexpf(float __a, int *__b)
__DEVICE__ double erfcx(double __a)
__DEVICE__ float rnormf(int __dim, const float *__t)
__DEVICE__ float sqrtf(float __a)
__DEVICE__ unsigned int umax(unsigned int __a, unsigned int __b)
__DEVICE_VOID__ void sincosf(float __a, float *__s, float *__c)
__DEVICE__ double exp10(double __a)
__DEVICE__ float fdividef(float __a, float __b)
__DEVICE__ float expf(float __a)
__DEVICE__ float expm1f(float __a)
#define __DEVICE_VOID__
__DEVICE__ float scalblnf(float __a, long __b)
__DEVICE__ int max(int __a, int __b)
__DEVICE__ float tgammaf(float __a)
__DEVICE__ double rsqrt(double __a)
__DEVICE__ float log1pf(float __a)
__DEVICE__ float lgammaf(float __a)
__DEVICE__ float y1f(float __a)
__DEVICE__ long long llroundf(float __a)
__DEVICE__ double jn(int __n, double __a)
__DEVICE__ double rnorm3d(double __a, double __b, double __c)
__DEVICE__ float hypotf(float __a, float __b)
__DEVICE__ double rnorm(int __a, const double *__b)
__DEVICE__ double erfcinv(double __a)
__DEVICE__ float j0f(float __a)
__DEVICE__ float asinf(float __a)
static __inline__ vector float vector float vector float __c
Definition: altivec.h:4800
static __inline__ vector float vector float __b
Definition: altivec.h:578
static __inline__ void int __a
Definition: emmintrin.h:4064
#define INT_MIN
Definition: limits.h:55
#define INT_MAX
Definition: limits.h:50
#define HUGE_VALF
A positive float constant expression.
#define HUGE_VAL
A positive double constant expression.
#define sinh(__x)
Definition: tgmath.h:373
#define asin(__x)
Definition: tgmath.h:112
#define scalbln(__x, __y)
Definition: tgmath.h:1182
#define sqrt(__x)
Definition: tgmath.h:520
#define acos(__x)
Definition: tgmath.h:83
#define fmin(__x, __y)
Definition: tgmath.h:780
#define exp(__x)
Definition: tgmath.h:431
#define ilogb(__x)
Definition: tgmath.h:851
#define copysign(__x, __y)
Definition: tgmath.h:618
#define erf(__x)
Definition: tgmath.h:636
#define atanh(__x)
Definition: tgmath.h:228
#define remquo(__x, __y, __z)
Definition: tgmath.h:1111
#define nextafter(__x, __y)
Definition: tgmath.h:1055
#define frexp(__x, __y)
Definition: tgmath.h:816
#define asinh(__x)
Definition: tgmath.h:199
#define erfc(__x)
Definition: tgmath.h:653
#define atan2(__x, __y)
Definition: tgmath.h:566
#define hypot(__x, __y)
Definition: tgmath.h:833
#define exp2(__x)
Definition: tgmath.h:670
#define sin(__x)
Definition: tgmath.h:286
#define cbrt(__x)
Definition: tgmath.h:584
#define log2(__x)
Definition: tgmath.h:970
#define llround(__x)
Definition: tgmath.h:919
#define cosh(__x)
Definition: tgmath.h:344
#define trunc(__x)
Definition: tgmath.h:1216
#define fmax(__x, __y)
Definition: tgmath.h:762
#define ldexp(__x, __y)
Definition: tgmath.h:868
#define acosh(__x)
Definition: tgmath.h:170
#define tgamma(__x)
Definition: tgmath.h:1199
#define scalbn(__x, __y)
Definition: tgmath.h:1165
#define round(__x)
Definition: tgmath.h:1148
#define fmod(__x, __y)
Definition: tgmath.h:798
#define llrint(__x)
Definition: tgmath.h:902
#define tan(__x)
Definition: tgmath.h:315
#define cos(__x)
Definition: tgmath.h:257
#define log10(__x)
Definition: tgmath.h:936
#define fabs(__x)
Definition: tgmath.h:549
#define pow(__x, __y)
Definition: tgmath.h:490
#define log1p(__x)
Definition: tgmath.h:953
#define rint(__x)
Definition: tgmath.h:1131
#define expm1(__x)
Definition: tgmath.h:687
#define remainder(__x, __y)
Definition: tgmath.h:1090
#define fdim(__x, __y)
Definition: tgmath.h:704
#define lgamma(__x)
Definition: tgmath.h:885
#define tanh(__x)
Definition: tgmath.h:402
#define lrint(__x)
Definition: tgmath.h:1004
#define atan(__x)
Definition: tgmath.h:141
#define floor(__x)
Definition: tgmath.h:722
#define ceil(__x)
Definition: tgmath.h:601
#define log(__x)
Definition: tgmath.h:460
#define logb(__x)
Definition: tgmath.h:987
#define nearbyint(__x)
Definition: tgmath.h:1038
#define lround(__x)
Definition: tgmath.h:1021
#define fma(__x, __y, __z)
Definition: tgmath.h:742