1 /* Test present data clauses in acc offloaded regions when the
2 subarray inside the present clause does not have the same base
3 offset value as the subarray in the enclosing acc data or acc enter
9 offset (int *data
, int n
)
13 #pragma acc parallel loop present (data[0:n])
14 for (i
= 0; i
< n
; i
++)
24 for (i
= 0; i
< n
; i
++)
27 #pragma acc data copy(data[0:n])
29 offset (data
+ 10, 10);
32 for (i
= 0; i
< n
; i
++)
34 if (i
< 10 || i
>= 20)
35 assert (data
[i
] == -1);
37 assert (data
[i
] == 10);