14 a = (int **) calloc (32, sizeof (int *));
15 for (int x = 0; x < 32; x++)
16 a[x] = (int *) calloc (32, sizeof (int));
18 for (int i = 2; i < 32; i++)
20 #pragma omp target enter data map(a, a[2:30])
21 #pragma omp target enter data map(a[i][j:n])
22 #pragma omp target map(alloc: a)
24 for (int x = j; x < j + n; x++)
27 #pragma omp target exit data map(a[i][j:n])
29 #pragma omp target data map(a, a[i][j:n])
31 #pragma omp target map(alloc: a)
33 for (int x = j; x < j + n; x++)
37 #pragma omp target exit data map(a, a[2:30])
39 #pragma omp target data map(a, a[2:30])
41 #pragma omp target map(a[i][j:n])
43 for (int x = j; x < j + n; x++)
49 for (int i = 0; i < 32; i++)
50 for (int j = 0; j < 32; j++)
51 if (i >= 2 && j >= 3 && j < 15)
52 assert (a[i][j] == 3);
54 assert (a[i][j] == 0);