5 #define uchar unsigned char
9 type foo_##type (void) \
11 _Complex type a = C + 45I; \
15 #pragma omp declare target
22 bar (float a
, float b
)
24 _Complex
float c
= a
+ b
* I
;
28 _Complex
float d
= 2.f
+ 4.44f
* I
;
30 return __real__(crealf (c
+ d
) + cimag (d
) * I
);
33 #pragma omp end declare target
41 #pragma omp target map(to: v)
46 #pragma omp target map(to: v)
51 #pragma omp target map(to: v)
56 #pragma omp target map(to: v)
61 #pragma omp target map(to: v2)
62 v2
= bar (1.12f
, 4.44f
);
64 assert (fabs (v2
- 14.12) < 0.0001f
);