10 #ifndef __CLANG_CUDA_COMPLEX_BUILTINS
11 #define __CLANG_CUDA_COMPLEX_BUILTINS
18 #pragma push_macro("__DEVICE__")
20 #pragma omp declare target
21 #define __DEVICE__ __attribute__((noinline, nothrow, cold, weak))
23 #define __DEVICE__ __device__ inline
30 #define _ISNANd std::isnan
31 #define _ISNANf std::isnan
32 #define _ISINFd std::isinf
33 #define _ISINFf std::isinf
34 #define _ISFINITEd std::isfinite
35 #define _ISFINITEf std::isfinite
36 #define _COPYSIGNd std::copysign
37 #define _COPYSIGNf std::copysign
38 #define _SCALBNd std::scalbn
39 #define _SCALBNf std::scalbn
40 #define _ABSd std::abs
41 #define _ABSf std::abs
42 #define _LOGBd std::logb
43 #define _LOGBf std::logb
45 #define _ISNANd __nv_isnand
46 #define _ISNANf __nv_isnanf
47 #define _ISINFd __nv_isinfd
48 #define _ISINFf __nv_isinff
49 #define _ISFINITEd __nv_isfinited
50 #define _ISFINITEf __nv_finitef
51 #define _COPYSIGNd __nv_copysign
52 #define _COPYSIGNf __nv_copysignf
53 #define _SCALBNd __nv_scalbn
54 #define _SCALBNf __nv_scalbnf
55 #define _ABSd __nv_fabs
56 #define _ABSf __nv_fabsf
57 #define _LOGBd __nv_logb
58 #define _LOGBf __nv_logbf
61 #if defined(__cplusplus)
68 double __bd =
__b * __d;
69 double __ad =
__a * __d;
72 __real__(z) = __ac - __bd;
73 __imag__(z) = __ad + __bc;
109 __real__(z) = __builtin_huge_val() * (
__a *
__c -
__b * __d);
110 __imag__(z) = __builtin_huge_val() * (
__a * __d +
__b *
__c);
118 float __bd =
__b * __d;
119 float __ad =
__a * __d;
122 __real__(z) = __ac - __bd;
123 __imag__(z) = __ad + __bc;
157 __real__(z) = __builtin_huge_valf() * (
__a *
__c -
__b * __d);
158 __imag__(z) = __builtin_huge_valf() * (
__a * __d +
__b *
__c);
172 __ilogbw = (
int)__logbw;
176 double __denom =
__c *
__c + __d * __d;
188 __real__(z) = __builtin_huge_val() * (
__a *
__c +
__b * __d);
189 __imag__(z) = __builtin_huge_val() * (
__b *
__c -
__a * __d);
194 __real__(z) = 0.0 * (
__a *
__c +
__b * __d);
195 __imag__(z) = 0.0 * (
__b *
__c -
__a * __d);
205 __ilogbw = (
int)__logbw;
209 float __denom =
__c *
__c + __d * __d;
221 __real__(z) = __builtin_huge_valf() * (
__a *
__c +
__b * __d);
222 __imag__(z) = __builtin_huge_valf() * (
__b *
__c -
__a * __d);
227 __real__(z) = 0 * (
__a *
__c +
__b * __d);
228 __imag__(z) = 0 * (
__b *
__c -
__a * __d);
234 #if defined(__cplusplus)
254 #pragma omp end declare target
257 #pragma pop_macro("__DEVICE__")
__DEVICE__ double _Complex __divdc3(double __a, double __b, double __c, double __d)
__DEVICE__ double _Complex __muldc3(double __a, double __b, double __c, double __d)
__DEVICE__ float _Complex __mulsc3(float __a, float __b, float __c, float __d)
__DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d)
__DEVICE__ int max(int __a, int __b)
static __inline__ vector float vector float vector float __c
static __inline__ vector float vector float __b
static __inline__ void int __a