1 extern void abort (void);
4 int a
[N
], b
[N
/ 16][8][4], c
[N
/ 32][8][8], g
[N
/ 16][8][6];
6 volatile unsigned long long f
;
13 #pragma omp parallel private (l)
15 #pragma omp for schedule(guided, 3) ordered (1) nowait
16 for (i
= 1; i
< N
+ f
; i
++)
18 #pragma omp atomic write
20 #pragma omp ordered depend(sink: i - 1)
23 #pragma omp atomic read
28 #pragma omp atomic write
32 #pragma omp atomic read
37 #pragma omp ordered depend(source)
38 #pragma omp atomic write
41 #pragma omp for schedule(guided) ordered (3) nowait
42 for (i
= 3; i
< N
/ 16 - 1 + f
; i
++)
43 for (j
= 0; j
< 8; j
+= 2)
44 for (k
= 1; k
<= 3; k
++)
46 #pragma omp atomic write
48 #pragma omp ordered depend(sink: i, j - 2, k - 1) \
49 depend(sink: i - 2, j - 2, k + 1)
50 #pragma omp ordered depend(sink: i - 3, j + 2, k - 2)
53 #pragma omp atomic read
54 l
= b
[i
][j
- 2][k
- 1];
58 #pragma omp atomic write
60 if (i
>= 5 && j
>= 2 && k
< 3)
62 #pragma omp atomic read
63 l
= b
[i
- 2][j
- 2][k
+ 1];
67 if (i
>= 6 && j
< N
/ 16 - 3 && k
== 3)
69 #pragma omp atomic read
70 l
= b
[i
- 3][j
+ 2][k
- 2];
74 #pragma omp ordered depend(source)
75 #pragma omp atomic write
79 #define B(n) A(n##0) A(n##1) A(n##2) A(n##3)
80 #define C(n) B(n##0) B(n##1) B(n##2) B(n##3)
81 #define D(n) C(n##0) C(n##1) C(n##2) C(n##3)
84 #pragma omp for collapse (2) ordered(61) schedule(guided, 15)
85 for (i
= 2; i
< N
/ 32 + f
; i
++)
86 for (j
= 7; j
> 1; j
--)
87 for (k
= 6; k
>= 0; k
-= 2)
88 #define A(n) for (n = 4; n < 5; n++)
92 #pragma omp atomic write
95 #define E(n) C(n##0) C(n##1) C(n##2) B(n##30) B(n##31) A(n##320) A(n##321)
96 #pragma omp ordered depend (sink: i, j, k + 2 E(m)) \
97 depend (sink:i - 2, j + 1, k - 4 E(m)) \
98 depend(sink: i - 1, j - 2, k - 2 E(m))
105 #pragma omp atomic write
107 if (i
>= 4 && j
< 7 && k
>= 4)
109 l
= c
[i
- 2][j
+ 1][k
- 4];
113 if (i
>= 3 && j
>= 4 && k
>= 2)
115 l
= c
[i
- 1][j
- 2][k
- 2];
119 #pragma omp ordered depend (source)
120 #pragma omp atomic write
123 #pragma omp for schedule(guided, 5) ordered (3) nowait
124 for (j
= 0; j
< N
/ 16 - 1; j
++)
125 for (k
= 0; k
< 8; k
+= 2)
126 for (i
= 3; i
<= 5 + f
; i
++)
128 #pragma omp atomic write
130 #pragma omp ordered depend(sink: j, k - 2, i - 1) \
131 depend(sink: j - 2, k - 2, i + 1)
132 #pragma omp ordered depend(sink: j - 3, k + 2, i - 2)
135 #pragma omp atomic read
136 l
= g
[j
][k
- 2][i
- 1];
140 #pragma omp atomic write
142 if (j
>= 2 && k
>= 2 && i
< 5)
144 #pragma omp atomic read
145 l
= g
[j
- 2][k
- 2][i
+ 1];
149 if (j
>= 3 && k
< N
/ 16 - 3 && i
== 5)
151 #pragma omp atomic read
152 l
= g
[j
- 3][k
+ 2][i
- 2];
156 #pragma omp ordered depend(source)
157 #pragma omp atomic write
160 #pragma omp for collapse(2) ordered(4) lastprivate (i, j, k)
161 for (i
= 2; i
< f
+ 3; i
++)
162 for (j
= d
+ 1; j
>= 0; j
--)
163 for (k
= 0; k
< d
; k
++)
164 for (l
= 0; l
< d
+ 2; l
++)
166 #pragma omp ordered depend (source)
167 #pragma omp ordered depend (sink:i - 2, j + 2, k - 2, l)
173 if (i
!= 3 || j
!= -1 || k
!= 0)
175 i
= 8; j
= 9; k
= 10;
177 #pragma omp for collapse(2) ordered(4) lastprivate (i, j, k, m)
178 for (i
= 2; i
< f
+ 3; i
++)
179 for (j
= d
+ 1; j
>= 0; j
--)
180 for (k
= 0; k
< d
+ 2; k
++)
181 for (m
= 0; m
< d
; m
++)
183 #pragma omp ordered depend (source)
184 #pragma omp ordered depend (sink:i - 2, j + 2, k - 2, m)
188 if (i
!= 3 || j
!= -1 || k
!= 2 || m
!= 0)
190 #pragma omp for collapse(2) ordered(4) nowait
191 for (i
= 2; i
< f
+ 3; i
++)
192 for (j
= d
; j
> 0; j
--)
193 for (k
= 0; k
< d
+ 2; k
++)
194 for (l
= 0; l
< d
+ 4; l
++)
196 #pragma omp ordered depend (source)
197 #pragma omp ordered depend (sink:i - 2, j + 2, k - 2, l)
201 #pragma omp for nowait
202 for (i
= 0; i
< N
; i
++)
203 if (a
[i
] != 3 * (i
>= 1))
205 #pragma omp for collapse(2) private(k) nowait
206 for (i
= 0; i
< N
/ 16; i
++)
207 for (j
= 0; j
< 8; j
++)
208 for (k
= 0; k
< 4; k
++)
209 if (b
[i
][j
][k
] != 3 * (i
>= 3 && i
< N
/ 16 - 1 && (j
& 1) == 0 && k
>= 1))
211 #pragma omp for collapse(3) nowait
212 for (i
= 0; i
< N
/ 32; i
++)
213 for (j
= 0; j
< 8; j
++)
214 for (k
= 0; k
< 8; k
++)
215 if (c
[i
][j
][k
] != 3 * (i
>= 2 && j
>= 2 && (k
& 1) == 0))
217 #pragma omp for collapse(2) private(k) nowait
218 for (i
= 0; i
< N
/ 16; i
++)
219 for (j
= 0; j
< 8; j
++)
220 for (k
= 0; k
< 6; k
++)
221 if (g
[i
][j
][k
] != 3 * (i
< N
/ 16 - 1 && (j
& 1) == 0 && k
>= 3))