10#ifndef __CLANG_CUDA_COMPLEX_BUILTINS
11#define __CLANG_CUDA_COMPLEX_BUILTINS
18#pragma push_macro("__DEVICE__")
19#if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__)
20#pragma omp declare target
21#define __DEVICE__ __attribute__((noinline, nothrow, cold, weak))
23#define __DEVICE__ __device__ inline
29#if !defined(__OPENMP_NVPTX__) && !defined(__OPENMP_AMDGCN__)
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
42#define _LOGBd std::logb
43#define _LOGBf std::logb
49#define _ISNANd __ocml_isnan_f64
50#define _ISNANf __ocml_isnan_f32
51#define _ISINFd __ocml_isinf_f64
52#define _ISINFf __ocml_isinf_f32
53#define _ISFINITEd __ocml_isfinite_f64
54#define _ISFINITEf __ocml_isfinite_f32
55#define _COPYSIGNd __ocml_copysign_f64
56#define _COPYSIGNf __ocml_copysign_f32
57#define _SCALBNd __ocml_scalbn_f64
58#define _SCALBNf __ocml_scalbn_f32
59#define _ABSd __ocml_fabs_f64
60#define _ABSf __ocml_fabs_f32
61#define _LOGBd __ocml_logb_f64
62#define _LOGBf __ocml_logb_f32
63#define _fmaxd __ocml_fmax_f64
64#define _fmaxf __ocml_fmax_f32
66#define _ISNANd __nv_isnand
67#define _ISNANf __nv_isnanf
68#define _ISINFd __nv_isinfd
69#define _ISINFf __nv_isinff
70#define _ISFINITEd __nv_isfinited
71#define _ISFINITEf __nv_finitef
72#define _COPYSIGNd __nv_copysign
73#define _COPYSIGNf __nv_copysignf
74#define _SCALBNd __nv_scalbn
75#define _SCALBNf __nv_scalbnf
76#define _ABSd __nv_fabs
77#define _ABSf __nv_fabsf
78#define _LOGBd __nv_logb
79#define _LOGBf __nv_logbf
80#define _fmaxd __nv_fmax
81#define _fmaxf __nv_fmaxf
85#if defined(__cplusplus)
92 double __bd =
__b * __d;
93 double __ad =
__a * __d;
96 __real__(z) = __ac - __bd;
97 __imag__(z) = __ad + __bc;
133 __real__(z) = __builtin_huge_val() * (
__a *
__c -
__b * __d);
134 __imag__(z) = __builtin_huge_val() * (
__a * __d +
__b *
__c);
142 float __bd =
__b * __d;
143 float __ad =
__a * __d;
146 __real__(z) = __ac - __bd;
147 __imag__(z) = __ad + __bc;
181 __real__(z) = __builtin_huge_valf() * (
__a *
__c -
__b * __d);
182 __imag__(z) = __builtin_huge_valf() * (
__a * __d +
__b *
__c);
196 __ilogbw = (
int)__logbw;
200 double __denom =
__c *
__c + __d * __d;
212 __real__(z) = __builtin_huge_val() * (
__a *
__c +
__b * __d);
213 __imag__(z) = __builtin_huge_val() * (
__b *
__c -
__a * __d);
218 __real__(z) = 0.0 * (
__a *
__c +
__b * __d);
219 __imag__(z) = 0.0 * (
__b *
__c -
__a * __d);
229 __ilogbw = (
int)__logbw;
233 float __denom =
__c *
__c + __d * __d;
245 __real__(z) = __builtin_huge_valf() * (
__a *
__c +
__b * __d);
246 __imag__(z) = __builtin_huge_valf() * (
__b *
__c -
__a * __d);
251 __real__(z) = 0 * (
__a *
__c +
__b * __d);
252 __imag__(z) = 0 * (
__b *
__c -
__a * __d);
258#if defined(__cplusplus)
279#if defined(__OPENMP_NVPTX__) || defined(__OPENMP_AMDGCN__)
280#pragma omp end declare target
283#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)
static __inline__ vector float vector float vector float __c
static __inline__ vector float vector float __b
static __inline__ void int __a