Get rid of the warning about ignoring the return value of fgets
[cloog.git] / test / darte.good.c
blob298c24fe5e55b54f8184cc4bea40a79bb43d4e40
1 /* Generated from ../../../git/cloog/test/darte.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */
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,j,k) { hash(1); hash(i); hash(j); hash(k); }
11 #define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); }
13 void test(int n)
15 /* Scattering iterators. */
16 int t1, t2, t3;
17 /* Original iterators. */
18 int i, j, k;
19 if (n >= 1) {
20 t1 = -n+1 ;
21 t2 = n+1 ;
22 for (t3=n+3;t3<=3*n+1;t3++) {
23 if ((t3+n+1)%2 == 0) {
24 k = (t3-n-1)/2 ;
25 S1(1,n,(t3-n-1)/2) ;
29 if ((n >= 2) && (n <= 2)) {
30 t1 = -n+2 ;
31 for (t2=-n+4;t2<=3*n-2;t2++) {
32 for (t3=t2+2;t3<=t2+2*n;t3++) {
33 if ((t2+n)%2 == 0) {
34 i = (t2-n+2)/2 ;
35 j = (t2+n-2)/2 ;
36 if ((t3+n)%2 == 0) {
37 k = (-t2+t3)/2 ;
38 S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ;
43 t2 = n+3 ;
44 for (t3=1;t3<=n;t3++) {
45 S2(1,n,t3) ;
48 if (n >= 3) {
49 t1 = -n+2 ;
50 for (t2=n;t2<=n+2;t2++) {
51 for (t3=t2+2;t3<=t2+2*n;t3++) {
52 if ((t2+n)%2 == 0) {
53 i = (t2-n+2)/2 ;
54 j = (t2+n-2)/2 ;
55 if ((t3+n)%2 == 0) {
56 k = (-t2+t3)/2 ;
57 S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ;
62 t2 = n+3 ;
63 for (t3=1;t3<=n;t3++) {
64 S2(1,n,t3) ;
67 for (t1=ceild(-2*n+5,2);t1<=min(-n+6,-1);t1++) {
68 for (t2=-t1+2;t2<=-t1+4;t2++) {
69 for (t3=t2+2;t3<=t2+2*n;t3++) {
70 if ((t1+t2)%2 == 0) {
71 i = (t1+t2)/2 ;
72 j = (-t1+t2)/2 ;
73 if ((t1+t3)%2 == 0) {
74 k = (-t2+t3)/2 ;
75 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
80 for (t2=-t1+5;t2<=t1+2*n;t2++) {
81 for (t3=1;t3<=n;t3++) {
82 if ((t1+t2+1)%2 == 0) {
83 i = (t1+t2-3)/2 ;
84 j = (-t1+t2-1)/2 ;
85 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
88 for (t3=t2+2;t3<=t2+2*n;t3++) {
89 if ((t1+t2)%2 == 0) {
90 i = (t1+t2)/2 ;
91 j = (-t1+t2)/2 ;
92 if ((t1+t3)%2 == 0) {
93 k = (-t2+t3)/2 ;
94 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
99 t2 = t1+2*n+1 ;
100 for (t3=1;t3<=n;t3++) {
101 i = t1+n-1 ;
102 S2(t1+n-1,n,t3) ;
105 if (n == 2) {
106 for (t3=5;t3<=7;t3++) {
107 if ((t3+1)%2 == 0) {
108 k = (t3-3)/2 ;
109 S1(2,1,(t3-3)/2) ;
112 for (t2=4;t2<=6;t2++) {
113 for (t3=1;t3<=2;t3++) {
114 if (t2%2 == 0) {
115 i = (t2-2)/2 ;
116 j = (t2-2)/2 ;
117 S2((t2-2)/2,(t2-2)/2,t3) ;
122 for (t1=-n+7;t1<=-1;t1++) {
123 for (t2=-t1+2;t2<=-t1+4;t2++) {
124 for (t3=t2+2;t3<=t2+2*n;t3++) {
125 if ((t1+t2)%2 == 0) {
126 i = (t1+t2)/2 ;
127 j = (-t1+t2)/2 ;
128 if ((t1+t3)%2 == 0) {
129 k = (-t2+t3)/2 ;
130 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
135 for (t2=-t1+5;t2<=n-2;t2++) {
136 for (t3=1;t3<=t2+1;t3++) {
137 if ((t1+t2+1)%2 == 0) {
138 i = (t1+t2-3)/2 ;
139 j = (-t1+t2-1)/2 ;
140 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
143 for (t3=t2+2;t3<=n;t3++) {
144 if ((t1+t2+1)%2 == 0) {
145 i = (t1+t2-3)/2 ;
146 j = (-t1+t2-1)/2 ;
147 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
149 if ((t1+t2)%2 == 0) {
150 i = (t1+t2)/2 ;
151 j = (-t1+t2)/2 ;
152 if ((t1+t3)%2 == 0) {
153 k = (-t2+t3)/2 ;
154 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
158 for (t3=n+1;t3<=t2+2*n;t3++) {
159 if ((t1+t2)%2 == 0) {
160 i = (t1+t2)/2 ;
161 j = (-t1+t2)/2 ;
162 if ((t1+t3)%2 == 0) {
163 k = (-t2+t3)/2 ;
164 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
169 for (t2=n-1;t2<=t1+2*n;t2++) {
170 for (t3=1;t3<=n;t3++) {
171 if ((t1+t2+1)%2 == 0) {
172 i = (t1+t2-3)/2 ;
173 j = (-t1+t2-1)/2 ;
174 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
177 for (t3=t2+2;t3<=t2+2*n;t3++) {
178 if ((t1+t2)%2 == 0) {
179 i = (t1+t2)/2 ;
180 j = (-t1+t2)/2 ;
181 if ((t1+t3)%2 == 0) {
182 k = (-t2+t3)/2 ;
183 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
188 t2 = t1+2*n+1 ;
189 for (t3=1;t3<=n;t3++) {
190 i = t1+n-1 ;
191 S2(t1+n-1,n,t3) ;
194 if (n >= 3) {
195 for (t1=0;t1<=min(1,-n+6);t1++) {
196 for (t2=t1+2;t2<=-t1+4;t2++) {
197 for (t3=t2+2;t3<=t2+2*n;t3++) {
198 if ((t1+t2)%2 == 0) {
199 i = (t1+t2)/2 ;
200 j = (-t1+t2)/2 ;
201 if ((t1+t3)%2 == 0) {
202 k = (-t2+t3)/2 ;
203 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
208 for (t2=-t1+5;t2<=-t1+2*n;t2++) {
209 for (t3=1;t3<=n;t3++) {
210 if ((t1+t2+1)%2 == 0) {
211 i = (t1+t2-3)/2 ;
212 j = (-t1+t2-1)/2 ;
213 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
216 for (t3=t2+2;t3<=t2+2*n;t3++) {
217 if ((t1+t2)%2 == 0) {
218 i = (t1+t2)/2 ;
219 j = (-t1+t2)/2 ;
220 if ((t1+t3)%2 == 0) {
221 k = (-t2+t3)/2 ;
222 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
227 for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) {
228 for (t3=1;t3<=n;t3++) {
229 if ((t1+t2+1)%2 == 0) {
230 i = (t1+t2-3)/2 ;
231 j = (-t1+t2-1)/2 ;
232 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
238 for (t1=max(-n+7,0);t1<=1;t1++) {
239 for (t2=t1+2;t2<=-t1+4;t2++) {
240 for (t3=t2+2;t3<=t2+2*n;t3++) {
241 if ((t1+t2)%2 == 0) {
242 i = (t1+t2)/2 ;
243 j = (-t1+t2)/2 ;
244 if ((t1+t3)%2 == 0) {
245 k = (-t2+t3)/2 ;
246 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
251 for (t2=-t1+5;t2<=n-2;t2++) {
252 for (t3=1;t3<=t2+1;t3++) {
253 if ((t1+t2+1)%2 == 0) {
254 i = (t1+t2-3)/2 ;
255 j = (-t1+t2-1)/2 ;
256 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
259 for (t3=t2+2;t3<=n;t3++) {
260 if ((t1+t2+1)%2 == 0) {
261 i = (t1+t2-3)/2 ;
262 j = (-t1+t2-1)/2 ;
263 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
265 if ((t1+t2)%2 == 0) {
266 i = (t1+t2)/2 ;
267 j = (-t1+t2)/2 ;
268 if ((t1+t3)%2 == 0) {
269 k = (-t2+t3)/2 ;
270 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
274 for (t3=n+1;t3<=t2+2*n;t3++) {
275 if ((t1+t2)%2 == 0) {
276 i = (t1+t2)/2 ;
277 j = (-t1+t2)/2 ;
278 if ((t1+t3)%2 == 0) {
279 k = (-t2+t3)/2 ;
280 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
285 for (t2=n-1;t2<=-t1+2*n;t2++) {
286 for (t3=1;t3<=n;t3++) {
287 if ((t1+t2+1)%2 == 0) {
288 i = (t1+t2-3)/2 ;
289 j = (-t1+t2-1)/2 ;
290 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
293 for (t3=t2+2;t3<=t2+2*n;t3++) {
294 if ((t1+t2)%2 == 0) {
295 i = (t1+t2)/2 ;
296 j = (-t1+t2)/2 ;
297 if ((t1+t3)%2 == 0) {
298 k = (-t2+t3)/2 ;
299 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
304 for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) {
305 for (t3=1;t3<=n;t3++) {
306 if ((t1+t2+1)%2 == 0) {
307 i = (t1+t2-3)/2 ;
308 j = (-t1+t2-1)/2 ;
309 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
314 for (t1=2;t1<=n-5;t1++) {
315 t2 = t1+2 ;
316 for (t3=t1+4;t3<=t1+2*n+2;t3++) {
317 i = t1+1 ;
318 if ((t1+t3)%2 == 0) {
319 k = (-t1+t3-2)/2 ;
320 S1(t1+1,1,(-t1+t3-2)/2) ;
323 for (t2=t1+3;t2<=n-2;t2++) {
324 for (t3=1;t3<=t2+1;t3++) {
325 if ((t1+t2+1)%2 == 0) {
326 i = (t1+t2-3)/2 ;
327 j = (-t1+t2-1)/2 ;
328 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
331 for (t3=t2+2;t3<=n;t3++) {
332 if ((t1+t2+1)%2 == 0) {
333 i = (t1+t2-3)/2 ;
334 j = (-t1+t2-1)/2 ;
335 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
337 if ((t1+t2)%2 == 0) {
338 i = (t1+t2)/2 ;
339 j = (-t1+t2)/2 ;
340 if ((t1+t3)%2 == 0) {
341 k = (-t2+t3)/2 ;
342 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
346 for (t3=n+1;t3<=t2+2*n;t3++) {
347 if ((t1+t2)%2 == 0) {
348 i = (t1+t2)/2 ;
349 j = (-t1+t2)/2 ;
350 if ((t1+t3)%2 == 0) {
351 k = (-t2+t3)/2 ;
352 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
357 for (t2=n-1;t2<=-t1+2*n;t2++) {
358 for (t3=1;t3<=n;t3++) {
359 if ((t1+t2+1)%2 == 0) {
360 i = (t1+t2-3)/2 ;
361 j = (-t1+t2-1)/2 ;
362 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
365 for (t3=t2+2;t3<=t2+2*n;t3++) {
366 if ((t1+t2)%2 == 0) {
367 i = (t1+t2)/2 ;
368 j = (-t1+t2)/2 ;
369 if ((t1+t3)%2 == 0) {
370 k = (-t2+t3)/2 ;
371 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
376 for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) {
377 for (t3=1;t3<=n;t3++) {
378 if ((t1+t2+1)%2 == 0) {
379 i = (t1+t2-3)/2 ;
380 j = (-t1+t2-1)/2 ;
381 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
386 for (t1=max(2,n-4);t1<=floord(2*n-3,2);t1++) {
387 t2 = t1+2 ;
388 for (t3=t1+4;t3<=t1+2*n+2;t3++) {
389 i = t1+1 ;
390 if ((t1+t3)%2 == 0) {
391 k = (-t1+t3-2)/2 ;
392 S1(t1+1,1,(-t1+t3-2)/2) ;
395 for (t2=t1+3;t2<=-t1+2*n;t2++) {
396 for (t3=1;t3<=n;t3++) {
397 if ((t1+t2+1)%2 == 0) {
398 i = (t1+t2-3)/2 ;
399 j = (-t1+t2-1)/2 ;
400 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
403 for (t3=t2+2;t3<=t2+2*n;t3++) {
404 if ((t1+t2)%2 == 0) {
405 i = (t1+t2)/2 ;
406 j = (-t1+t2)/2 ;
407 if ((t1+t3)%2 == 0) {
408 k = (-t2+t3)/2 ;
409 S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ;
414 for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) {
415 for (t3=1;t3<=n;t3++) {
416 if ((t1+t2+1)%2 == 0) {
417 i = (t1+t2-3)/2 ;
418 j = (-t1+t2-1)/2 ;
419 S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ;
424 if (n >= 3) {
425 t1 = n-1 ;
426 t2 = n+1 ;
427 for (t3=n+3;t3<=3*n+1;t3++) {
428 if ((t3+n+1)%2 == 0) {
429 k = (t3-n-1)/2 ;
430 S1(n,1,(t3-n-1)/2) ;
433 for (t2=n+2;t2<=n+4;t2++) {
434 for (t3=1;t3<=n;t3++) {
435 if ((t2+n)%2 == 0) {
436 i = (t2+n-4)/2 ;
437 j = (t2-n)/2 ;
438 S2((t2+n-4)/2,(t2-n)/2,t3) ;
443 if (n >= 1) {
444 t2 = n+3 ;
445 for (t3=1;t3<=n;t3++) {
446 S2(n,1,t3) ;