Update OpenScop Library to 0.8.1
[cloog.git] / test / reservoir / QR.good.c
blobfacd21404de7eb6e08e5e6794cd65fc8e32cc532
1 /* Generated from ../../../git/cloog/test/./reservoir/QR.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) { 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) { hash(5); hash(i); }
15 #define S6(i,j) { hash(6); hash(i); hash(j); }
16 #define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); }
17 #define S8(i,j) { hash(8); hash(i); hash(j); }
18 #define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); }
19 #define S10(i) { hash(10); hash(i); }
21 void test(int M, int N)
23 /* Scattering iterators. */
24 int c2, c4, c6;
25 /* Original iterators. */
26 int i, j, k;
27 if ((M <= -1) && (N >= 1)) {
28 S1(0) ;
30 if ((M >= 0) && (N >= 1)) {
31 S1(0) ;
33 if ((M >= 1) && (N >= 2)) {
34 for (c4=0;c4<=M-1;c4++) {
35 S2(0,c4) ;
37 S3(0) ;
38 for (c4=0;c4<=M-1;c4++) {
39 S4(0,c4) ;
41 S10(0) ;
42 S1(1) ;
43 S5(0) ;
45 if ((M <= 0) && (N >= 2)) {
46 S3(0) ;
47 S10(0) ;
48 S1(1) ;
49 S5(0) ;
51 if ((M >= 1) && (N == 1)) {
52 for (c4=0;c4<=M-1;c4++) {
53 S2(0,c4) ;
55 S3(0) ;
56 for (c4=0;c4<=M-1;c4++) {
57 S4(0,c4) ;
59 S10(0) ;
60 S5(0) ;
62 if ((M <= 0) && (N == 1)) {
63 S3(0) ;
64 S10(0) ;
65 S5(0) ;
67 for (c2=2;c2<=min(N-1,M);c2++) {
68 for (c4=c2-1;c4<=N-1;c4++) {
69 i = c2-2 ;
70 S6(c2-2,c4) ;
71 for (c6=c2-2;c6<=M-1;c6++) {
72 i = c2-2 ;
73 S7(c2-2,c4,c6) ;
75 i = c2-2 ;
76 S8(c2-2,c4) ;
77 for (c6=c2-2;c6<=M-1;c6++) {
78 i = c2-2 ;
79 S9(c2-2,c4,c6) ;
82 for (c4=c2-1;c4<=M-1;c4++) {
83 i = c2-1 ;
84 S2(c2-1,c4) ;
86 i = c2-1 ;
87 S3(c2-1) ;
88 for (c4=c2-1;c4<=M-1;c4++) {
89 i = c2-1 ;
90 S4(c2-1,c4) ;
92 i = c2-1 ;
93 S10(c2-1) ;
94 S1(c2) ;
95 i = c2-1 ;
96 S5(c2-1) ;
98 if ((M >= 1) && (M <= N-2)) {
99 c2 = M+1 ;
100 for (c4=M;c4<=N-1;c4++) {
101 i = M-1 ;
102 S6(M-1,c4) ;
103 c6 = M-1 ;
104 i = M-1 ;
105 k = M-1 ;
106 S7(M-1,c4,M-1) ;
107 i = M-1 ;
108 S8(M-1,c4) ;
109 c6 = M-1 ;
110 i = M-1 ;
111 k = M-1 ;
112 S9(M-1,c4,M-1) ;
114 S3(M) ;
115 S10(M) ;
116 i = M+1 ;
117 S1(M+1) ;
118 S5(M) ;
120 if ((M >= N) && (N >= 2)) {
121 c4 = N-1 ;
122 i = N-2 ;
123 j = N-1 ;
124 S6(N-2,N-1) ;
125 for (c6=N-2;c6<=M-1;c6++) {
126 i = N-2 ;
127 j = N-1 ;
128 S7(N-2,N-1,c6) ;
130 i = N-2 ;
131 j = N-1 ;
132 S8(N-2,N-1) ;
133 for (c6=N-2;c6<=M-1;c6++) {
134 i = N-2 ;
135 j = N-1 ;
136 S9(N-2,N-1,c6) ;
138 for (c4=N-1;c4<=M-1;c4++) {
139 i = N-1 ;
140 S2(N-1,c4) ;
142 i = N-1 ;
143 S3(N-1) ;
144 for (c4=N-1;c4<=M-1;c4++) {
145 i = N-1 ;
146 S4(N-1,c4) ;
148 i = N-1 ;
149 S10(N-1) ;
150 i = N-1 ;
151 S5(N-1) ;
153 if ((M == N-1) && (N >= 2)) {
154 c4 = N-1 ;
155 i = N-2 ;
156 j = N-1 ;
157 S6(N-2,N-1) ;
158 c6 = N-2 ;
159 i = N-2 ;
160 j = N-1 ;
161 k = N-2 ;
162 S7(N-2,N-1,N-2) ;
163 i = N-2 ;
164 j = N-1 ;
165 S8(N-2,N-1) ;
166 c6 = N-2 ;
167 i = N-2 ;
168 j = N-1 ;
169 k = N-2 ;
170 S9(N-2,N-1,N-2) ;
171 i = N-1 ;
172 S3(N-1) ;
173 i = N-1 ;
174 S10(N-1) ;
175 i = N-1 ;
176 S5(N-1) ;
178 for (c2=max(M+2,2);c2<=N-1;c2++) {
179 for (c4=c2-1;c4<=N-1;c4++) {
180 i = c2-2 ;
181 S6(c2-2,c4) ;
182 i = c2-2 ;
183 S8(c2-2,c4) ;
185 i = c2-1 ;
186 S3(c2-1) ;
187 i = c2-1 ;
188 S10(c2-1) ;
189 S1(c2) ;
190 i = c2-1 ;
191 S5(c2-1) ;
193 if ((M <= N-2) && (N >= 2)) {
194 c4 = N-1 ;
195 i = N-2 ;
196 j = N-1 ;
197 S6(N-2,N-1) ;
198 i = N-2 ;
199 j = N-1 ;
200 S8(N-2,N-1) ;
201 i = N-1 ;
202 S3(N-1) ;
203 i = N-1 ;
204 S10(N-1) ;
205 i = N-1 ;
206 S5(N-1) ;