1 /* Testing the 'has_device_addr' clause on the target construct with
2 enclosing 'target data' construct. */
11 #pragma omp target data map(x) use_device_addr(x)
12 #pragma omp target has_device_addr(x)
19 for (int i
= 0; i
< N
; i
++)
21 #pragma omp target data map(y) use_device_addr(y)
22 #pragma omp target has_device_addr(y)
23 for (int i
= 0; i
< N
; i
++)
25 for (int i
= 0; i
< N
; i
++)
29 #pragma omp target data map(y[:N]) use_device_addr(y)
30 #pragma omp target has_device_addr(y[:N])
31 for (int i
= 0; i
< N
; i
++)
33 for (int i
= 0; i
< N
; i
++)
37 #pragma omp target data map(y[:N]) use_device_addr(y)
38 #pragma omp target has_device_addr(y[24])
43 #pragma omp target data map(y[:N]) use_device_addr(y)
44 #pragma omp target has_device_addr(y[24:])
45 for (int i
= 24; i
< N
; i
++)
47 for (int i
= 24; i
< N
; i
++)
51 #pragma omp target data map(y[:N]) use_device_addr(y)
52 #pragma omp target has_device_addr(y[12:24])
53 for (int i
= 12; i
< 24; i
++)
55 for (int i
= 12; i
< 24; i
++)
60 #pragma omp target data map(u) use_device_addr(u)
61 #pragma omp target has_device_addr(u)
64 struct S
{ int m
; } s
;
66 #pragma omp target data map (s) use_device_addr (s)
67 #pragma omp target has_device_addr (s)