1 extern void abort (void);
4 int a
[N
], b
[N
/ 16][8][4], c
[N
/ 32][8][8];
11 #pragma omp parallel private (l)
13 #pragma omp for schedule(static, 1) ordered (1) nowait
14 for (i
= 0; i
< N
; i
++)
16 #pragma omp atomic write
18 #pragma omp ordered doacross(sink: omp_cur_iteration - 1)
21 #pragma omp atomic read
26 #pragma omp atomic write
30 #pragma omp atomic read
35 #pragma omp ordered doacross(source :)
36 #pragma omp atomic write
39 #pragma omp for schedule(static) ordered (3) nowait
40 for (i
= 2; i
< N
/ 16 - 1; i
++)
41 for (j
= 0; j
< 8; j
+= 2)
42 for (k
= 1; k
<= 3; k
++)
44 #pragma omp atomic write
46 #pragma omp ordered doacross(sink: omp_cur_iteration - 1) \
47 doacross(sink: i - 2, j - 2, k + 1)
48 #pragma omp ordered doacross(sink: i - 3, j + 2, k - 2)
49 if (i
!= 2 || j
|| k
!= 1)
52 #pragma omp atomic read
55 #pragma omp atomic read
58 #pragma omp atomic read
63 #pragma omp atomic write
65 if (i
>= 4 && j
>= 2 && k
< 3)
67 #pragma omp atomic read
68 l
= b
[i
- 2][j
- 2][k
+ 1];
72 if (i
>= 5 && j
< N
/ 16 - 3 && k
== 3)
74 #pragma omp atomic read
75 l
= b
[i
- 3][j
+ 2][k
- 2];
79 #pragma omp ordered doacross(source : omp_cur_iteration)
80 #pragma omp atomic write
84 #define B(n) A(n##0) A(n##1) A(n##2) A(n##3)
85 #define C(n) B(n##0) B(n##1) B(n##2) B(n##3)
86 #define D(n) C(n##0) C(n##1) C(n##2) C(n##3)
89 #pragma omp for collapse (2) ordered(61) schedule(dynamic, 15)
90 for (i
= 0; i
< N
/ 32; i
++)
91 for (j
= 7; j
> 1; j
--)
92 for (k
= 6; k
>= 0; k
-= 2)
93 #define A(n) for (n = 4; n < 5; n++)
97 #pragma omp atomic write
100 #define E(n) C(n##0) C(n##1) C(n##2) B(n##30) B(n##31) A(n##320) A(n##321)
101 #pragma omp ordered doacross (sink: i, j, k + 2 E(m)) \
102 doacross (sink:omp_cur_iteration - 1) \
103 doacross(sink: i - 1, j - 2, k - 2 E(m))
106 #pragma omp atomic read
111 #pragma omp atomic write
113 if (i
|| j
!= 7 && k
!= 6)
116 #pragma omp atomic read
119 #pragma omp atomic read
122 #pragma omp atomic read
127 if (i
>= 1 && j
>= 4 && k
>= 2)
129 #pragma omp atomic read
130 l
= c
[i
- 1][j
- 2][k
- 2];
134 #pragma omp ordered doacross (source: )
135 #pragma omp atomic write
139 #pragma omp for collapse(2) ordered(4) lastprivate (i, j, k)
140 for (i
= 0; i
< d
+ 1; i
++)
141 for (j
= d
+ 1; j
>= 0; j
--)
142 for (k
= 0; k
< d
; k
++)
143 for (l
= 0; l
< d
+ 2; l
++)
145 #pragma omp ordered doacross (source : omp_cur_iteration)
146 #pragma omp ordered doacross (sink: omp_cur_iteration - 1)
152 if (i
!= 1 || j
!= -1 || k
!= 0)
154 i
= 8; j
= 9; k
= 10;
156 #pragma omp for collapse(2) ordered(4) lastprivate (i, j, k, m)
157 for (i
= 0; i
< d
+ 1; i
++)
158 for (j
= d
+ 1; j
>= 0; j
--)
159 for (k
= 0; k
< d
+ 2; k
++)
160 for (m
= 0; m
< d
; m
++)
162 #pragma omp ordered doacross (source : )
163 #pragma omp ordered doacross (sink:omp_cur_iteration - 1)
167 if (i
!= 1 || j
!= -1 || k
!= 2 || m
!= 0)
169 #pragma omp for collapse(2) ordered(4) nowait
170 for (i
= 0; i
< d
+ 1; i
++)
171 for (j
= d
; j
> 0; j
--)
172 for (k
= 0; k
< d
+ 2; k
++)
173 for (l
= 0; l
< d
+ 4; l
++)
175 #pragma omp ordered doacross (source : omp_cur_iteration)
176 #pragma omp ordered doacross (sink:omp_cur_iteration - 1)
180 #pragma omp for nowait
181 for (i
= 0; i
< N
; i
++)
184 #pragma omp for collapse(2) private(k) nowait
185 for (i
= 0; i
< N
/ 16; i
++)
186 for (j
= 0; j
< 8; j
++)
187 for (k
= 0; k
< 4; k
++)
188 if (b
[i
][j
][k
] != 3 * (i
>= 2 && i
< N
/ 16 - 1 && (j
& 1) == 0 && k
>= 1))
190 #pragma omp for collapse(3) nowait
191 for (i
= 0; i
< N
/ 32; i
++)
192 for (j
= 0; j
< 8; j
++)
193 for (k
= 0; k
< 8; k
++)
194 if (c
[i
][j
][k
] != 3 * (j
>= 2 && (k
& 1) == 0))