Added howto file for a new CLooG release
[cloog.git] / test / christian.good.c
blob28f578c42a82efee2806ceebbea80aa95612c8f2
1 /* Generated from ../../../git/cloog/test/christian.cloog by CLooG 0.16.2-5-g3b3bf96 gmp bits in 0.02s. */
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) { hash(1); hash(i); hash(j); }
11 #define S2(i,j) { hash(2); hash(i); hash(j); }
13 void test(int N)
15 /* Scattering iterators. */
16 int p;
17 /* Original iterators. */
18 int i, j;
19 if (N >= 1) {
20 S1(0,N-1);
21 for (p=-N+2;p<=N-1;p++) {
22 if (p >= 1) {
23 S2(p-1,0);
25 for (i=max(0,p);i<=min(N-1,p+N-2);i++) {
26 S1(i,-p+i);
27 S2(i,-p+i+1);
29 if (p <= 0) {
30 S1(p+N-1,N-1);
33 S2(N-1,0);