1 /* Verify enter/exit data interoperability between pragmas and
13 int *p
= (int *)malloc (sizeof (int));
15 /* Test 1: pragma input, library output. */
17 #pragma acc enter data copyin (p[0:1])
19 #pragma acc parallel present (p[0:1]) num_gangs (1)
24 acc_copyout (p
, sizeof (int));
28 /* Test 2: library input, pragma output. */
30 acc_copyin (p
, sizeof (int));
32 #pragma acc parallel present (p[0:1]) num_gangs (1)
37 #pragma acc exit data copyout (p[0:1])
41 /* Test 3: library input, library output. */
43 acc_copyin (p
, sizeof (int));
45 #pragma acc parallel present (p[0:1]) num_gangs (1)
50 acc_copyout (p
, sizeof (int));
54 /* Test 4: pragma input, pragma output. */
56 #pragma acc enter data copyin (p[0:1])
58 #pragma acc parallel present (p[0:1]) num_gangs (1)
63 #pragma acc exit data copyout (p[0:1])