Get rid of the warning about ignoring the return value of fgets
[cloog.git] / test / classen.good.c
blob5c97c50c594a5a6736caf9599f4e0ffd802ec141
1 /* Generated from ../../../git/cloog/test/classen.cloog by CLooG 0.14.0-76-gfd78716 gmp bits in 1.73s. */
2 extern void hash(int);
4 /* Useful macros. */
5 #define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))
6 #define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))
7 #define max(x,y) ((x) > (y) ? (x) : (y))
8 #define min(x,y) ((x) < (y) ? (x) : (y))
10 #define S1(coordT1,coordP1,other1,other2) { hash(1); hash(coordT1); hash(coordP1); hash(other1); hash(other2); }
11 #define S2(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(2); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); }
12 #define S3(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(3); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); }
13 #define S4(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(4); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); }
14 #define S5(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(5); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); }
15 #define S6(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(6); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); }
16 #define S7(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(7); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); }
17 #define S8(coordT1,coordP1) { hash(8); hash(coordT1); hash(coordP1); }
19 void test(int m)
21 /* Scattering iterators. */
22 int glT1, rp1, local1, local2;
23 /* Original iterators. */
24 int coordT1, coordP1, other1, other2, other3, other4, other5, other6;
25 if (m >= 2) {
26 S1(0,1,1,1) ;
27 S2(0,1,1,1,1,1,2,1) ;
28 S3(0,1,1,2,1,1,1,2) ;
29 S4(0,1,2,2,1,1,2,2) ;
30 S8(0,1) ;
32 if (m == 1) {
33 S1(0,1,1,1) ;
34 S8(0,1) ;
36 if (m >= 3) {
37 S5(0,1,1,1,1,1,2,1) ;
38 S1(1,1,2,1) ;
39 S2(1,1,2,1,2,1,3,1) ;
40 S3(1,1,2,2,2,1,2,2) ;
41 S4(1,1,3,2,2,1,3,2) ;
42 S6(0,1,1,2,1,1,1,2) ;
43 S7(0,1,2,2,1,1,2,2) ;
44 S1(1,2,1,2) ;
45 S2(1,2,2,2,1,2,2,2) ;
46 S3(1,2,2,3,1,2,1,3) ;
47 S4(1,2,3,3,1,2,2,3) ;
48 for (coordP1=1;coordP1<=2;coordP1++) {
49 S8(1,coordP1) ;
52 for (glT1=2;glT1<=m-2;glT1++) {
53 coordT1 = glT1-1 ;
54 other5 = glT1+1 ;
55 S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1) ;
56 other1 = glT1+1 ;
57 S1(glT1,1,glT1+1,1) ;
58 local1 = glT1+1 ;
59 other1 = glT1+1 ;
60 other3 = glT1+1 ;
61 other5 = glT1+2 ;
62 S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1) ;
63 other3 = glT1+1 ;
64 other5 = glT1+1 ;
65 S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2) ;
66 other1 = glT1+2 ;
67 other3 = glT1+1 ;
68 other5 = glT1+2 ;
69 S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2) ;
70 for (rp1=2;rp1<=glT1;rp1++) {
71 local1 = glT1-rp1+1 ;
72 coordT1 = glT1-1 ;
73 other3 = glT1-rp1+1 ;
74 other5 = glT1-rp1+2 ;
75 S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ;
76 local1 = glT1-rp1+2 ;
77 local2 = rp1-1 ;
78 coordT1 = glT1-1 ;
79 coordP1 = rp1-1 ;
80 other3 = glT1-rp1+2 ;
81 other4 = rp1-1 ;
82 other5 = glT1-rp1+2 ;
83 S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ;
84 other1 = glT1+1 ;
85 other3 = glT1-rp1+2 ;
86 other4 = rp1-1 ;
87 other5 = glT1-rp1+3 ;
88 S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ;
89 other1 = glT1-rp1+2 ;
90 S1(glT1,rp1,glT1-rp1+2,rp1) ;
91 local1 = glT1-rp1+2 ;
92 other1 = glT1+1 ;
93 other3 = glT1-rp1+2 ;
94 other5 = glT1-rp1+3 ;
95 S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ;
96 other2 = rp1+1 ;
97 other3 = glT1-rp1+2 ;
98 other5 = glT1-rp1+2 ;
99 other6 = rp1+1 ;
100 S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ;
101 other1 = glT1+2 ;
102 other2 = rp1+1 ;
103 other3 = glT1-rp1+2 ;
104 other5 = glT1-rp1+3 ;
105 other6 = rp1+1 ;
106 S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ;
108 rp1 = glT1+1 ;
109 coordT1 = glT1-1 ;
110 other2 = glT1+1 ;
111 other6 = glT1+1 ;
112 S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1) ;
113 other1 = glT1+1 ;
114 other2 = glT1+1 ;
115 other6 = glT1+1 ;
116 S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1) ;
117 coordP1 = glT1+1 ;
118 other2 = glT1+1 ;
119 S1(glT1,glT1+1,1,glT1+1) ;
120 local2 = glT1+1 ;
121 coordP1 = glT1+1 ;
122 other1 = glT1+1 ;
123 other2 = glT1+1 ;
124 other4 = glT1+1 ;
125 other6 = glT1+1 ;
126 S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1) ;
127 other2 = glT1+2 ;
128 other4 = glT1+1 ;
129 other6 = glT1+2 ;
130 S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2) ;
131 other1 = glT1+2 ;
132 other2 = glT1+2 ;
133 other4 = glT1+1 ;
134 other6 = glT1+2 ;
135 S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2) ;
136 for (coordP1=1;coordP1<=glT1+1;coordP1++) {
137 S8(glT1,coordP1) ;
140 if (m >= 3) {
141 glT1 = m-1 ;
142 local1 = m-1 ;
143 coordT1 = m-2 ;
144 other1 = m-1 ;
145 other3 = m-1 ;
146 S5(m-2,1,m-1,1,m-1,1,m,1) ;
147 coordT1 = m-1 ;
148 S1(m-1,1,m,1) ;
149 coordT1 = m-1 ;
150 S3(m-1,1,m,2,m,1,m,2) ;
151 for (rp1=2;rp1<=m-1;rp1++) {
152 local1 = -rp1+m ;
153 coordT1 = m-2 ;
154 other1 = m-1 ;
155 other3 = -rp1+m ;
156 other5 = -rp1+m+1 ;
157 S5(m-2,rp1,m-1,rp1,-rp1+m,rp1,-rp1+m+1,rp1) ;
158 local1 = -rp1+m+1 ;
159 local2 = rp1-1 ;
160 coordT1 = m-2 ;
161 coordP1 = rp1-1 ;
162 other1 = m-1 ;
163 other3 = -rp1+m+1 ;
164 other4 = rp1-1 ;
165 other5 = -rp1+m+1 ;
166 S6(m-2,rp1-1,m-1,rp1,-rp1+m+1,rp1-1,-rp1+m+1,rp1) ;
167 other3 = -rp1+m+1 ;
168 other4 = rp1-1 ;
169 other5 = -rp1+m+2 ;
170 S7(m-2,rp1-1,m,rp1,-rp1+m+1,rp1-1,-rp1+m+2,rp1) ;
171 coordT1 = m-1 ;
172 other1 = -rp1+m+1 ;
173 S1(m-1,rp1,-rp1+m+1,rp1) ;
174 local1 = -rp1+m+1 ;
175 coordT1 = m-1 ;
176 other3 = -rp1+m+1 ;
177 other5 = -rp1+m+2 ;
178 S2(m-1,rp1,m,rp1,-rp1+m+1,rp1,-rp1+m+2,rp1) ;
179 other2 = rp1+1 ;
180 other3 = -rp1+m+1 ;
181 other5 = -rp1+m+1 ;
182 other6 = rp1+1 ;
183 S3(m-1,rp1,m,rp1+1,-rp1+m+1,rp1,-rp1+m+1,rp1+1) ;
184 other1 = m+1 ;
185 other2 = rp1+1 ;
186 other3 = -rp1+m+1 ;
187 other5 = -rp1+m+2 ;
188 other6 = rp1+1 ;
189 S4(m-1,rp1,m+1,rp1+1,-rp1+m+1,rp1,-rp1+m+2,rp1+1) ;
191 local2 = m-1 ;
192 coordT1 = m-2 ;
193 coordP1 = m-1 ;
194 other1 = m-1 ;
195 other4 = m-1 ;
196 S6(m-2,m-1,m-1,m,1,m-1,1,m) ;
197 other4 = m-1 ;
198 S7(m-2,m-1,m,m,1,m-1,2,m) ;
199 coordT1 = m-1 ;
200 S1(m-1,m,1,m) ;
201 coordT1 = m-1 ;
202 S2(m-1,m,m,m,1,m,2,m) ;
203 coordT1 = m-1 ;
204 for (coordP1=1;coordP1<=m;coordP1++) {
205 S8(m-1,coordP1) ;
208 for (glT1=m;glT1<=2*m-4;glT1++) {
209 rp1 = glT1-m+2 ;
210 local1 = m-1 ;
211 local2 = glT1-m+2 ;
212 coordT1 = glT1-1 ;
213 coordP1 = glT1-m+2 ;
214 other2 = glT1-m+2 ;
215 other3 = m-1 ;
216 other4 = glT1-m+2 ;
217 other6 = glT1-m+2 ;
218 S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2) ;
219 local2 = glT1-m+1 ;
220 coordT1 = glT1-1 ;
221 coordP1 = glT1-m+1 ;
222 other2 = glT1-m+2 ;
223 other4 = glT1-m+1 ;
224 other6 = glT1-m+2 ;
225 S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2) ;
226 coordP1 = glT1-m+2 ;
227 other2 = glT1-m+2 ;
228 S1(glT1,glT1-m+2,m,glT1-m+2) ;
229 local2 = glT1-m+2 ;
230 coordP1 = glT1-m+2 ;
231 other1 = glT1+1 ;
232 other2 = glT1-m+3 ;
233 other4 = glT1-m+2 ;
234 other6 = glT1-m+3 ;
235 S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3) ;
236 for (rp1=glT1-m+3;rp1<=m-1;rp1++) {
237 local1 = glT1-rp1+1 ;
238 coordT1 = glT1-1 ;
239 other3 = glT1-rp1+1 ;
240 other5 = glT1-rp1+2 ;
241 S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ;
242 local1 = glT1-rp1+2 ;
243 local2 = rp1-1 ;
244 coordT1 = glT1-1 ;
245 coordP1 = rp1-1 ;
246 other3 = glT1-rp1+2 ;
247 other4 = rp1-1 ;
248 other5 = glT1-rp1+2 ;
249 S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ;
250 other1 = glT1+1 ;
251 other3 = glT1-rp1+2 ;
252 other4 = rp1-1 ;
253 other5 = glT1-rp1+3 ;
254 S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ;
255 other1 = glT1-rp1+2 ;
256 S1(glT1,rp1,glT1-rp1+2,rp1) ;
257 local1 = glT1-rp1+2 ;
258 other1 = glT1+1 ;
259 other3 = glT1-rp1+2 ;
260 other5 = glT1-rp1+3 ;
261 S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ;
262 other2 = rp1+1 ;
263 other3 = glT1-rp1+2 ;
264 other5 = glT1-rp1+2 ;
265 other6 = rp1+1 ;
266 S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ;
267 other1 = glT1+2 ;
268 other2 = rp1+1 ;
269 other3 = glT1-rp1+2 ;
270 other5 = glT1-rp1+3 ;
271 other6 = rp1+1 ;
272 S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ;
274 local1 = glT1-m+1 ;
275 coordT1 = glT1-1 ;
276 other3 = glT1-m+1 ;
277 other5 = glT1-m+2 ;
278 S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m) ;
279 local1 = glT1-m+2 ;
280 local2 = m-1 ;
281 coordT1 = glT1-1 ;
282 coordP1 = m-1 ;
283 other3 = glT1-m+2 ;
284 other4 = m-1 ;
285 other5 = glT1-m+2 ;
286 S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m) ;
287 other1 = glT1+1 ;
288 other3 = glT1-m+2 ;
289 other4 = m-1 ;
290 other5 = glT1-m+3 ;
291 S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m) ;
292 other1 = glT1-m+2 ;
293 S1(glT1,m,glT1-m+2,m) ;
294 local1 = glT1-m+2 ;
295 other1 = glT1+1 ;
296 other3 = glT1-m+2 ;
297 other5 = glT1-m+3 ;
298 S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m) ;
299 for (coordP1=glT1-m+2;coordP1<=m;coordP1++) {
300 S8(glT1,coordP1) ;
303 if (m >= 3) {
304 glT1 = 2*m-3 ;
305 rp1 = m-1 ;
306 local1 = m-1 ;
307 local2 = m-1 ;
308 coordT1 = 2*m-4 ;
309 coordP1 = m-1 ;
310 other1 = 2*m-3 ;
311 other2 = m-1 ;
312 other3 = m-1 ;
313 other4 = m-1 ;
314 other6 = m-1 ;
315 S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1) ;
316 local2 = m-2 ;
317 coordT1 = 2*m-4 ;
318 coordP1 = m-2 ;
319 other1 = 2*m-3 ;
320 other2 = m-1 ;
321 other4 = m-2 ;
322 other6 = m-1 ;
323 S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1) ;
324 coordT1 = 2*m-3 ;
325 coordP1 = m-1 ;
326 other2 = m-1 ;
327 S1(2*m-3,m-1,m,m-1) ;
328 local2 = m-1 ;
329 coordT1 = 2*m-3 ;
330 coordP1 = m-1 ;
331 other1 = 2*m-2 ;
332 other4 = m-1 ;
333 S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ;
334 local1 = m-2 ;
335 coordT1 = 2*m-4 ;
336 other1 = 2*m-3 ;
337 other3 = m-2 ;
338 other5 = m-1 ;
339 S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m) ;
340 local1 = m-1 ;
341 local2 = m-1 ;
342 coordT1 = 2*m-4 ;
343 coordP1 = m-1 ;
344 other1 = 2*m-3 ;
345 other3 = m-1 ;
346 other4 = m-1 ;
347 other5 = m-1 ;
348 S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m) ;
349 other1 = 2*m-2 ;
350 other3 = m-1 ;
351 other4 = m-1 ;
352 S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m) ;
353 coordT1 = 2*m-3 ;
354 other1 = m-1 ;
355 S1(2*m-3,m,m-1,m) ;
356 local1 = m-1 ;
357 coordT1 = 2*m-3 ;
358 other1 = 2*m-2 ;
359 other3 = m-1 ;
360 S2(2*m-3,m,2*m-2,m,m-1,m,m,m) ;
361 coordT1 = 2*m-3 ;
362 for (coordP1=m-1;coordP1<=m;coordP1++) {
363 S8(2*m-3,coordP1) ;
366 if (m == 2) {
367 S5(0,1,1,1,1,1,2,1) ;
368 S1(1,1,2,1) ;
369 S3(1,1,2,2,2,1,2,2) ;
370 S6(0,1,1,2,1,1,1,2) ;
371 S7(0,1,2,2,1,1,2,2) ;
372 S1(1,2,1,2) ;
373 S2(1,2,2,2,1,2,2,2) ;
374 for (coordP1=1;coordP1<=2;coordP1++) {
375 S8(1,coordP1) ;
378 if (m >= 2) {
379 glT1 = 2*m-2 ;
380 local1 = m-1 ;
381 coordT1 = 2*m-3 ;
382 other1 = 2*m-2 ;
383 other3 = m-1 ;
384 S5(2*m-3,m,2*m-2,m,m-1,m,m,m) ;
385 local2 = m-1 ;
386 coordT1 = 2*m-3 ;
387 coordP1 = m-1 ;
388 other1 = 2*m-2 ;
389 other4 = m-1 ;
390 S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ;
391 coordT1 = 2*m-2 ;
392 S1(2*m-2,m,m,m) ;
393 coordT1 = 2*m-2 ;
394 S8(2*m-2,m) ;