CLooG 0.18.4
[cloog.git] / test / reservoir / cholesky2.good.c
blob36efcde3bfd72a09ca6cfe35cdb0399f60cfd564
1 /* Generated from ../../../git/cloog/test/./reservoir/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */
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,j,k) { hash(3); hash(i); hash(j); hash(k); }
14 void test(int M)
16 /* Scattering iterators. */
17 int c2, c4, c6;
18 /* Original iterators. */
19 int i, j, k;
20 for (c2=2;c2<=min(3,3*M-4);c2++) {
21 if ((c2+1)%3 == 0) {
22 i = (c2+1)/3 ;
23 S1((c2+1)/3) ;
25 for (c4=ceild(c2+4,3);c4<=min(c2,M);c4++) {
26 if ((c2+c4)%2 == 0) {
27 i = (c2-c4+2)/2 ;
28 S2((c2-c4+2)/2,c4) ;
32 for (c2=4;c2<=3*M-4;c2++) {
33 if ((c2+1)%3 == 0) {
34 i = (c2+1)/3 ;
35 S1((c2+1)/3) ;
37 for (c4=ceild(c2+2,3);c4<=min(c2-2,M);c4++) {
38 for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) {
39 i = c2-c4-c6+1 ;
40 S3(c2-c4-c6+1,c4,c6) ;
43 for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) {
44 if ((c2+c4)%2 == 0) {
45 i = (c2-c4+2)/2 ;
46 S2((c2-c4+2)/2,c4) ;
50 for (c2=max(2,3*M-3);c2<=min(3,3*M-2);c2++) {
51 if ((c2+1)%3 == 0) {
52 i = (c2+1)/3 ;
53 S1((c2+1)/3) ;
56 for (c2=max(3*M-3,4);c2<=3*M-2;c2++) {
57 if ((c2+1)%3 == 0) {
58 i = (c2+1)/3 ;
59 S1((c2+1)/3) ;
61 for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) {
62 for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) {
63 i = c2-c4-c6+1 ;
64 S3(c2-c4-c6+1,c4,c6) ;
68 if (M >= 1) {
69 c2 = 3*M-1 ;
70 S1(M) ;