Get rid of the warning about ignoring the return value of fgets
[cloog.git] / test / vivien2.good.c
blob32f1fff503a063098e69c7c23ff343228189626e
1 /* Generated from ../../../git/cloog/test/vivien2.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.58s. */
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(i) { hash(1); hash(i); }
11 #define S2(i,j) { hash(2); hash(i); hash(j); }
12 #define S3(i) { hash(3); hash(i); }
13 #define S4(i,j) { hash(4); hash(i); hash(j); }
14 #define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); }
15 #define S6(i,j) { hash(6); hash(i); hash(j); }
17 void test(int n)
19 /* Scattering iterators. */
20 int p1, p2, p3;
21 /* Original iterators. */
22 int i, j, k;
23 for (p1=-54*n+4;p1<=4;p1++) {
24 if (p1%2 == 0) {
25 i = (p1-2)/2 ;
26 S1((p1-2)/2) ;
29 S3(1) ;
30 S4(1,2) ;
31 S1(2) ;
32 S6(1,2) ;
33 for (p1=7;p1<=9;p1++) {
34 for (p2=ceild(-p1+2,4);p2<=-1;p2++) {
35 if (p1%2 == 0) {
36 j = (p1+2*p2)/2 ;
37 S4(-p2,(p1+2*p2)/2) ;
40 if ((p1+3)%4 == 0) {
41 i = (p1-1)/4 ;
42 S3((p1-1)/4) ;
44 if (p1%2 == 0) {
45 i = (p1-2)/2 ;
46 S1((p1-2)/2) ;
48 if (p1%2 == 0) {
49 j = (p1-2)/2 ;
50 S6(1,(p1-2)/2) ;
52 if ((p1+1)%2 == 0) {
53 i = (p1-3)/2 ;
54 S2((p1-3)/2,1) ;
57 S4(2,3) ;
58 S4(1,4) ;
59 S5(2,3,1) ;
60 S6(2,3) ;
61 S1(4) ;
62 S6(1,4) ;
63 for (p1=11;p1<=12;p1++) {
64 p2 = floord(-p1+5,4) ;
65 if (p1%2 == 0) {
66 j = (p1+2*p2)/2 ;
67 S4(-p2,(p1+2*p2)/2) ;
69 for (p2=ceild(-p1+6,4);p2<=-1;p2++) {
70 if (p1%2 == 0) {
71 j = (p1+2*p2)/2 ;
72 S4(-p2,(p1+2*p2)/2) ;
74 for (p3=1;p3<=-p2;p3++) {
75 i = -p2+1 ;
76 if (p1%2 == 0) {
77 j = (p1+2*p2-2)/2 ;
78 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
82 if (p1%2 == 0) {
83 j = (p1-4)/2 ;
84 S6(2,(p1-4)/2) ;
86 if (p1%2 == 0) {
87 i = (p1-2)/2 ;
88 S1((p1-2)/2) ;
90 if (p1%2 == 0) {
91 j = (p1-2)/2 ;
92 S6(1,(p1-2)/2) ;
94 if ((p1+1)%2 == 0) {
95 i = (p1-3)/2 ;
96 S2((p1-3)/2,1) ;
98 for (p2=2;p2<=floord(p1-3,4);p2++) {
99 if ((p1+1)%2 == 0) {
100 i = (p1-2*p2-1)/2 ;
101 S2((p1-2*p2-1)/2,p2) ;
105 S3(3) ;
106 S2(5,1) ;
107 S2(4,2) ;
108 for (p1=14;p1<=2*n+2;p1++) {
109 p2 = floord(-p1+5,4) ;
110 if (p1%2 == 0) {
111 j = (p1+2*p2)/2 ;
112 S4(-p2,(p1+2*p2)/2) ;
114 p2 = floord(-p1+9,4) ;
115 if (p1%2 == 0) {
116 j = (p1+2*p2)/2 ;
117 S4(-p2,(p1+2*p2)/2) ;
119 for (p3=1;p3<=-p2;p3++) {
120 i = -p2+1 ;
121 if (p1%2 == 0) {
122 j = (p1+2*p2-2)/2 ;
123 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
126 for (p2=ceild(-p1+10,4);p2<=-1;p2++) {
127 if (p1%2 == 0) {
128 j = (p1+2*p2)/2 ;
129 S4(-p2,(p1+2*p2)/2) ;
131 i = -p2+2 ;
132 if (p1%2 == 0) {
133 j = (p1+2*p2-4)/2 ;
134 S6(-p2+2,(p1+2*p2-4)/2) ;
136 for (p3=1;p3<=-p2;p3++) {
137 i = -p2+1 ;
138 if (p1%2 == 0) {
139 j = (p1+2*p2-2)/2 ;
140 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
144 if (p1%2 == 0) {
145 j = (p1-4)/2 ;
146 S6(2,(p1-4)/2) ;
148 if ((p1+3)%4 == 0) {
149 i = (p1-1)/4 ;
150 S3((p1-1)/4) ;
152 if (p1%2 == 0) {
153 i = (p1-2)/2 ;
154 S1((p1-2)/2) ;
156 if (p1%2 == 0) {
157 j = (p1-2)/2 ;
158 S6(1,(p1-2)/2) ;
160 if ((p1+1)%2 == 0) {
161 i = (p1-3)/2 ;
162 S2((p1-3)/2,1) ;
164 for (p2=2;p2<=floord(p1-3,4);p2++) {
165 if ((p1+1)%2 == 0) {
166 i = (p1-2*p2-1)/2 ;
167 S2((p1-2*p2-1)/2,p2) ;
171 p1 = 2*n+3 ;
172 if ((n+1)%2 == 0) {
173 i = (n+1)/2 ;
174 S3((n+1)/2) ;
176 S2(n,1) ;
177 for (p2=2;p2<=floord(n,2);p2++) {
178 i = -p2+n+1 ;
179 S2(-p2+n+1,p2) ;
181 p1 = 2*n+4 ;
182 for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) {
183 j = p2+n+2 ;
184 S4(-p2,p2+n+2) ;
186 for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) {
187 j = p2+n+2 ;
188 S4(-p2,p2+n+2) ;
189 for (p3=1;p3<=-p2;p3++) {
190 i = -p2+1 ;
191 j = p2+n+1 ;
192 S5(-p2+1,p2+n+1,p3) ;
195 for (p2=ceild(-n+3,2);p2<=-2;p2++) {
196 j = p2+n+2 ;
197 S4(-p2,p2+n+2) ;
198 i = -p2+2 ;
199 j = p2+n ;
200 S6(-p2+2,p2+n) ;
201 for (p3=1;p3<=-p2;p3++) {
202 i = -p2+1 ;
203 j = p2+n+1 ;
204 S5(-p2+1,p2+n+1,p3) ;
207 j = n-1 ;
208 S6(3,n-1) ;
209 S5(2,n,1) ;
210 S6(2,n) ;
211 i = n+1 ;
212 S1(n+1) ;
213 for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) {
214 p2 = floord(-p1+5,4) ;
215 if (p1%2 == 0) {
216 j = (p1+2*p2)/2 ;
217 S4(-p2,(p1+2*p2)/2) ;
219 p2 = floord(-p1+9,4) ;
220 if (p1%2 == 0) {
221 j = (p1+2*p2)/2 ;
222 S4(-p2,(p1+2*p2)/2) ;
224 for (p3=1;p3<=-p2;p3++) {
225 i = -p2+1 ;
226 if (p1%2 == 0) {
227 j = (p1+2*p2-2)/2 ;
228 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
231 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) {
232 if (p1%2 == 0) {
233 j = (p1+2*p2)/2 ;
234 S4(-p2,(p1+2*p2)/2) ;
236 i = -p2+2 ;
237 if (p1%2 == 0) {
238 j = (p1+2*p2-4)/2 ;
239 S6(-p2+2,(p1+2*p2-4)/2) ;
241 for (p3=1;p3<=-p2;p3++) {
242 i = -p2+1 ;
243 if (p1%2 == 0) {
244 j = (p1+2*p2-2)/2 ;
245 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
249 p2 = floord(-p1+2*n+2,2) ;
250 i = -p2+2 ;
251 if (p1%2 == 0) {
252 j = (p1+2*p2-4)/2 ;
253 S6(-p2+2,(p1+2*p2-4)/2) ;
255 for (p3=1;p3<=-p2;p3++) {
256 i = -p2+1 ;
257 if (p1%2 == 0) {
258 j = (p1+2*p2-2)/2 ;
259 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
262 for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) {
263 i = -p2+2 ;
264 if (p1%2 == 0) {
265 j = (p1+2*p2-4)/2 ;
266 S6(-p2+2,(p1+2*p2-4)/2) ;
269 if ((p1+3)%4 == 0) {
270 i = (p1-1)/4 ;
271 S3((p1-1)/4) ;
273 if (p1%2 == 0) {
274 i = (p1-2)/2 ;
275 S1((p1-2)/2) ;
277 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
278 if ((p1+1)%2 == 0) {
279 i = (p1-2*p2-1)/2 ;
280 S2((p1-2*p2-1)/2,p2) ;
284 for (p1=4*n-9;p1<=min(4*n-8,2*n+58);p1++) {
285 p2 = floord(-p1+5,4) ;
286 if (p1%2 == 0) {
287 j = (p1+2*p2)/2 ;
288 S4(-p2,(p1+2*p2)/2) ;
290 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
291 if (p1%2 == 0) {
292 j = (p1+2*p2)/2 ;
293 S4(-p2,(p1+2*p2)/2) ;
295 for (p3=1;p3<=-p2;p3++) {
296 i = -p2+1 ;
297 if (p1%2 == 0) {
298 j = (p1+2*p2-2)/2 ;
299 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
303 p2 = floord(-p1+2*n+2,2) ;
304 i = -p2+2 ;
305 if (p1%2 == 0) {
306 j = (p1+2*p2-4)/2 ;
307 S6(-p2+2,(p1+2*p2-4)/2) ;
309 for (p3=1;p3<=-p2;p3++) {
310 i = -p2+1 ;
311 if (p1%2 == 0) {
312 j = (p1+2*p2-2)/2 ;
313 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
316 p2 = floord(-p1+2*n+4,2) ;
317 i = -p2+2 ;
318 if (p1%2 == 0) {
319 j = (p1+2*p2-4)/2 ;
320 S6(-p2+2,(p1+2*p2-4)/2) ;
322 if ((p1+3)%4 == 0) {
323 i = (p1-1)/4 ;
324 S3((p1-1)/4) ;
326 if (p1%2 == 0) {
327 i = (p1-2)/2 ;
328 S1((p1-2)/2) ;
330 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
331 if ((p1+1)%2 == 0) {
332 i = (p1-2*p2-1)/2 ;
333 S2((p1-2*p2-1)/2,p2) ;
337 for (p1=4*n-7;p1<=min(4*n-6,2*n+58);p1++) {
338 p2 = floord(-p1+5,4) ;
339 if (p1%2 == 0) {
340 j = (p1+2*p2)/2 ;
341 S4(-p2,(p1+2*p2)/2) ;
343 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
344 if (p1%2 == 0) {
345 j = (p1+2*p2)/2 ;
346 S4(-p2,(p1+2*p2)/2) ;
348 for (p3=1;p3<=-p2;p3++) {
349 i = -p2+1 ;
350 if (p1%2 == 0) {
351 j = (p1+2*p2-2)/2 ;
352 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
356 for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) {
357 for (p3=1;p3<=-p2;p3++) {
358 i = -p2+1 ;
359 if (p1%2 == 0) {
360 j = (p1+2*p2-2)/2 ;
361 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
365 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) {
366 i = -p2+2 ;
367 if (p1%2 == 0) {
368 j = (p1+2*p2-4)/2 ;
369 S6(-p2+2,(p1+2*p2-4)/2) ;
371 for (p3=1;p3<=-p2;p3++) {
372 i = -p2+1 ;
373 if (p1%2 == 0) {
374 j = (p1+2*p2-2)/2 ;
375 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
379 p2 = floord(-p1+2*n+4,2) ;
380 i = -p2+2 ;
381 if (p1%2 == 0) {
382 j = (p1+2*p2-4)/2 ;
383 S6(-p2+2,(p1+2*p2-4)/2) ;
385 if ((p1+3)%4 == 0) {
386 i = (p1-1)/4 ;
387 S3((p1-1)/4) ;
389 if (p1%2 == 0) {
390 i = (p1-2)/2 ;
391 S1((p1-2)/2) ;
393 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
394 if ((p1+1)%2 == 0) {
395 i = (p1-2*p2-1)/2 ;
396 S2((p1-2*p2-1)/2,p2) ;
400 for (p1=4*n-5;p1<=2*n+58;p1++) {
401 for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) {
402 if (p1%2 == 0) {
403 j = (p1+2*p2)/2 ;
404 S4(-p2,(p1+2*p2)/2) ;
407 for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) {
408 for (p3=1;p3<=-p2;p3++) {
409 i = -p2+1 ;
410 if (p1%2 == 0) {
411 j = (p1+2*p2-2)/2 ;
412 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
416 for (p2=max(ceild(-p1+2*n+3,2),ceild(-p1+10,4));p2<=floord(-p1+2*n+4,2);p2++) {
417 i = -p2+2 ;
418 if (p1%2 == 0) {
419 j = (p1+2*p2-4)/2 ;
420 S6(-p2+2,(p1+2*p2-4)/2) ;
423 if ((p1+3)%4 == 0) {
424 i = (p1-1)/4 ;
425 S3((p1-1)/4) ;
427 if (p1%2 == 0) {
428 i = (p1-2)/2 ;
429 S1((p1-2)/2) ;
431 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
432 if ((p1+1)%2 == 0) {
433 i = (p1-2*p2-1)/2 ;
434 S2((p1-2*p2-1)/2,p2) ;
438 for (p1=2*n+59;p1<=4*n-10;p1++) {
439 p2 = floord(-p1+5,4) ;
440 if (p1%2 == 0) {
441 j = (p1+2*p2)/2 ;
442 S4(-p2,(p1+2*p2)/2) ;
444 p2 = floord(-p1+9,4) ;
445 if (p1%2 == 0) {
446 j = (p1+2*p2)/2 ;
447 S4(-p2,(p1+2*p2)/2) ;
449 for (p3=1;p3<=-p2;p3++) {
450 i = -p2+1 ;
451 if (p1%2 == 0) {
452 j = (p1+2*p2-2)/2 ;
453 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
456 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) {
457 if (p1%2 == 0) {
458 j = (p1+2*p2)/2 ;
459 S4(-p2,(p1+2*p2)/2) ;
461 i = -p2+2 ;
462 if (p1%2 == 0) {
463 j = (p1+2*p2-4)/2 ;
464 S6(-p2+2,(p1+2*p2-4)/2) ;
466 for (p3=1;p3<=-p2;p3++) {
467 i = -p2+1 ;
468 if (p1%2 == 0) {
469 j = (p1+2*p2-2)/2 ;
470 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
474 p2 = floord(-p1+2*n+2,2) ;
475 i = -p2+2 ;
476 if (p1%2 == 0) {
477 j = (p1+2*p2-4)/2 ;
478 S6(-p2+2,(p1+2*p2-4)/2) ;
480 for (p3=1;p3<=-p2;p3++) {
481 i = -p2+1 ;
482 if (p1%2 == 0) {
483 j = (p1+2*p2-2)/2 ;
484 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
487 p2 = floord(-p1+2*n+4,2) ;
488 i = -p2+2 ;
489 if (p1%2 == 0) {
490 j = (p1+2*p2-4)/2 ;
491 S6(-p2+2,(p1+2*p2-4)/2) ;
493 if ((p1+3)%4 == 0) {
494 i = (p1-1)/4 ;
495 S3((p1-1)/4) ;
497 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
498 if ((p1+1)%2 == 0) {
499 i = (p1-2*p2-1)/2 ;
500 S2((p1-2*p2-1)/2,p2) ;
504 for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) {
505 p2 = floord(-p1+5,4) ;
506 if (p1%2 == 0) {
507 j = (p1+2*p2)/2 ;
508 S4(-p2,(p1+2*p2)/2) ;
510 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
511 if (p1%2 == 0) {
512 j = (p1+2*p2)/2 ;
513 S4(-p2,(p1+2*p2)/2) ;
515 for (p3=1;p3<=-p2;p3++) {
516 i = -p2+1 ;
517 if (p1%2 == 0) {
518 j = (p1+2*p2-2)/2 ;
519 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
523 p2 = floord(-p1+2*n+2,2) ;
524 i = -p2+2 ;
525 if (p1%2 == 0) {
526 j = (p1+2*p2-4)/2 ;
527 S6(-p2+2,(p1+2*p2-4)/2) ;
529 for (p3=1;p3<=-p2;p3++) {
530 i = -p2+1 ;
531 if (p1%2 == 0) {
532 j = (p1+2*p2-2)/2 ;
533 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
536 p2 = floord(-p1+2*n+4,2) ;
537 i = -p2+2 ;
538 if (p1%2 == 0) {
539 j = (p1+2*p2-4)/2 ;
540 S6(-p2+2,(p1+2*p2-4)/2) ;
542 if ((p1+3)%4 == 0) {
543 i = (p1-1)/4 ;
544 S3((p1-1)/4) ;
546 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
547 if ((p1+1)%2 == 0) {
548 i = (p1-2*p2-1)/2 ;
549 S2((p1-2*p2-1)/2,p2) ;
553 for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) {
554 p2 = floord(-p1+5,4) ;
555 if (p1%2 == 0) {
556 j = (p1+2*p2)/2 ;
557 S4(-p2,(p1+2*p2)/2) ;
559 for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) {
560 if (p1%2 == 0) {
561 j = (p1+2*p2)/2 ;
562 S4(-p2,(p1+2*p2)/2) ;
564 for (p3=1;p3<=-p2;p3++) {
565 i = -p2+1 ;
566 if (p1%2 == 0) {
567 j = (p1+2*p2-2)/2 ;
568 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
572 for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) {
573 for (p3=1;p3<=-p2;p3++) {
574 i = -p2+1 ;
575 if (p1%2 == 0) {
576 j = (p1+2*p2-2)/2 ;
577 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
581 for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) {
582 i = -p2+2 ;
583 if (p1%2 == 0) {
584 j = (p1+2*p2-4)/2 ;
585 S6(-p2+2,(p1+2*p2-4)/2) ;
587 for (p3=1;p3<=-p2;p3++) {
588 i = -p2+1 ;
589 if (p1%2 == 0) {
590 j = (p1+2*p2-2)/2 ;
591 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
595 p2 = floord(-p1+2*n+4,2) ;
596 i = -p2+2 ;
597 if (p1%2 == 0) {
598 j = (p1+2*p2-4)/2 ;
599 S6(-p2+2,(p1+2*p2-4)/2) ;
601 if ((p1+3)%4 == 0) {
602 i = (p1-1)/4 ;
603 S3((p1-1)/4) ;
605 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
606 if ((p1+1)%2 == 0) {
607 i = (p1-2*p2-1)/2 ;
608 S2((p1-2*p2-1)/2,p2) ;
612 for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) {
613 for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) {
614 if (p1%2 == 0) {
615 j = (p1+2*p2)/2 ;
616 S4(-p2,(p1+2*p2)/2) ;
619 for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) {
620 for (p3=1;p3<=-p2;p3++) {
621 i = -p2+1 ;
622 if (p1%2 == 0) {
623 j = (p1+2*p2-2)/2 ;
624 S5(-p2+1,(p1+2*p2-2)/2,p3) ;
628 for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) {
629 i = -p2+2 ;
630 if (p1%2 == 0) {
631 j = (p1+2*p2-4)/2 ;
632 S6(-p2+2,(p1+2*p2-4)/2) ;
635 if ((p1+3)%4 == 0) {
636 i = (p1-1)/4 ;
637 S3((p1-1)/4) ;
639 for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) {
640 if ((p1+1)%2 == 0) {
641 i = (p1-2*p2-1)/2 ;
642 S2((p1-2*p2-1)/2,p2) ;
646 p1 = 4*n-1 ;
647 p2 = n-1 ;
648 j = n-1 ;
649 S2(n,n-1) ;
650 for (p1=4*n;p1<=4*n+1;p1++) {
651 if ((p1+3)%4 == 0) {
652 i = (p1-1)/4 ;
653 S3((p1-1)/4) ;