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 depend(sink: i - 1)
21 #pragma omp atomic read
26 #pragma omp atomic write
30 #pragma omp atomic read
35 #pragma omp ordered depend(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 depend(sink: i, j - 2, k - 1) \
47 depend(sink: i - 2, j - 2, k + 1)
48 #pragma omp ordered depend(sink: i - 3, j + 2, k - 2)
51 #pragma omp atomic read
52 l
= b
[i
][j
- 2][k
- 1];
56 #pragma omp atomic write
58 if (i
>= 4 && j
>= 2 && k
< 3)
60 #pragma omp atomic read
61 l
= b
[i
- 2][j
- 2][k
+ 1];
65 if (i
>= 5 && j
< N
/ 16 - 3 && k
== 3)
67 #pragma omp atomic read
68 l
= b
[i
- 3][j
+ 2][k
- 2];
72 #pragma omp ordered depend(source)
73 #pragma omp atomic write
77 #define B(n) A(n##0) A(n##1) A(n##2) A(n##3)
78 #define C(n) B(n##0) B(n##1) B(n##2) B(n##3)
79 #define D(n) C(n##0) C(n##1) C(n##2) C(n##3)
82 #pragma omp for collapse (2) ordered(61) schedule(dynamic, 15)
83 for (i
= 0; i
< N
/ 32; i
++)
84 for (j
= 7; j
> 1; j
--)
85 for (k
= 6; k
>= 0; k
-= 2)
86 #define A(n) for (n = 4; n < 5; n++)
90 #pragma omp atomic write
93 #define E(n) C(n##0) C(n##1) C(n##2) B(n##30) B(n##31) A(n##320) A(n##321)
94 #pragma omp ordered depend (sink: i, j, k + 2 E(m)) \
95 depend (sink:i - 2, j + 1, k - 4 E(m)) \
96 depend(sink: i - 1, j - 2, k - 2 E(m))
99 #pragma omp atomic read
104 #pragma omp atomic write
106 if (i
>= 2 && j
< 7 && k
>= 4)
108 #pragma omp atomic read
109 l
= c
[i
- 2][j
+ 1][k
- 4];
113 if (i
>= 1 && j
>= 4 && k
>= 2)
115 #pragma omp atomic read
116 l
= c
[i
- 1][j
- 2][k
- 2];
120 #pragma omp ordered depend (source)
121 #pragma omp atomic write
125 #pragma omp for collapse(2) ordered(4) lastprivate (i, j, k)
126 for (i
= 0; i
< d
+ 1; i
++)
127 for (j
= d
+ 1; j
>= 0; j
--)
128 for (k
= 0; k
< d
; k
++)
129 for (l
= 0; l
< d
+ 2; l
++)
131 #pragma omp ordered depend (source)
132 #pragma omp ordered depend (sink:i - 2, j + 2, k - 2, l)
138 if (i
!= 1 || j
!= -1 || k
!= 0)
140 i
= 8; j
= 9; k
= 10;
142 #pragma omp for collapse(2) ordered(4) lastprivate (i, j, k, m)
143 for (i
= 0; i
< d
+ 1; i
++)
144 for (j
= d
+ 1; j
>= 0; j
--)
145 for (k
= 0; k
< d
+ 2; k
++)
146 for (m
= 0; m
< d
; m
++)
148 #pragma omp ordered depend (source)
149 #pragma omp ordered depend (sink:i - 2, j + 2, k - 2, m)
153 if (i
!= 1 || j
!= -1 || k
!= 2 || m
!= 0)
155 #pragma omp for collapse(2) ordered(4) nowait
156 for (i
= 0; i
< d
+ 1; i
++)
157 for (j
= d
; j
> 0; j
--)
158 for (k
= 0; k
< d
+ 2; k
++)
159 for (l
= 0; l
< d
+ 4; l
++)
161 #pragma omp ordered depend (source)
162 #pragma omp ordered depend (sink:i - 2, j + 2, k - 2, l)
166 #pragma omp for nowait
167 for (i
= 0; i
< N
; i
++)
170 #pragma omp for collapse(2) private(k) nowait
171 for (i
= 0; i
< N
/ 16; i
++)
172 for (j
= 0; j
< 8; j
++)
173 for (k
= 0; k
< 4; k
++)
174 if (b
[i
][j
][k
] != 3 * (i
>= 2 && i
< N
/ 16 - 1 && (j
& 1) == 0 && k
>= 1))
176 #pragma omp for collapse(3) nowait
177 for (i
= 0; i
< N
/ 32; i
++)
178 for (j
= 0; j
< 8; j
++)
179 for (k
= 0; k
< 8; k
++)
180 if (c
[i
][j
][k
] != 3 * (j
>= 2 && (k
& 1) == 0))