diff options
author | jk7744.park <jk7744.park@samsung.com> | 2015-09-09 02:18:21 +0900 |
---|---|---|
committer | jk7744.park <jk7744.park@samsung.com> | 2015-09-09 02:18:21 +0900 |
commit | 40ef93558be42b604f5eb912414f767972a70b8c (patch) | |
tree | dd3a18995e2d72f452f3804d87b8a205f0f0a936 /cloog-core/test/reservoir/mg-rprj3.good.c | |
parent | eea72ec0021ec2c1c84631af37435123c063eaf1 (diff) | |
download | cloog-tizen_2.3.1.tar.gz cloog-tizen_2.3.1.tar.bz2 cloog-tizen_2.3.1.zip |
tizen 2.3.1 releasetizen_2.3.1_releasesubmit/tizen_2.3.1/20150915.095034tizen_2.3.1
Diffstat (limited to 'cloog-core/test/reservoir/mg-rprj3.good.c')
-rw-r--r-- | cloog-core/test/reservoir/mg-rprj3.good.c | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/cloog-core/test/reservoir/mg-rprj3.good.c b/cloog-core/test/reservoir/mg-rprj3.good.c new file mode 100644 index 0000000..38ac53e --- /dev/null +++ b/cloog-core/test/reservoir/mg-rprj3.good.c @@ -0,0 +1,163 @@ +/* Generated from ../../../git/cloog/test/./reservoir/mg-rprj3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.39s. */ +extern void hash(int); + +/* Useful macros. */ +#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d)) +#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d)) +#define max(x,y) ((x) > (y) ? (x) : (y)) +#define min(x,y) ((x) < (y) ? (x) : (y)) + +#define S1(i,j,k) { hash(1); hash(i); hash(j); hash(k); } +#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } +#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } +#define S4(i,j,k) { hash(4); hash(i); hash(j); hash(k); } +#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } + +void test(int M, int N, int O, int P, int Q, int R) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M >= 4) && (N >= 4)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=2;c6<=M;c6++) { + S1(c2,2,c6) ; + } + for (c4=3;c4<=N-1;c4++) { + for (c6=2;c6<=M;c6++) { + j = c4-1 ; + S2(c2,c4-1,c6) ; + } + j = c4-1 ; + S4(c2,c4-1,2) ; + for (c6=2;c6<=M-2;c6++) { + j = c4-1 ; + S3(c2,c4-1,c6) ; + j = c4-1 ; + S5(c2,c4-1,c6) ; + j = c4-1 ; + k = c6+1 ; + S4(c2,c4-1,c6+1) ; + } + c6 = M-1 ; + j = c4-1 ; + k = M-1 ; + S3(c2,c4-1,M-1) ; + j = c4-1 ; + k = M-1 ; + S5(c2,c4-1,M-1) ; + for (c6=2;c6<=M;c6++) { + S1(c2,c4,c6) ; + } + } + for (c6=2;c6<=M;c6++) { + j = N-1 ; + S2(c2,N-1,c6) ; + } + j = N-1 ; + S4(c2,N-1,2) ; + for (c6=2;c6<=M-2;c6++) { + j = N-1 ; + S3(c2,N-1,c6) ; + j = N-1 ; + S5(c2,N-1,c6) ; + j = N-1 ; + k = c6+1 ; + S4(c2,N-1,c6+1) ; + } + c6 = M-1 ; + j = N-1 ; + k = M-1 ; + S3(c2,N-1,M-1) ; + j = N-1 ; + k = M-1 ; + S5(c2,N-1,M-1) ; + } + } + if ((M >= 4) && (N == 3)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=2;c6<=M;c6++) { + S1(c2,2,c6) ; + } + for (c6=2;c6<=M;c6++) { + S2(c2,2,c6) ; + } + S4(c2,2,2) ; + for (c6=2;c6<=M-2;c6++) { + S3(c2,2,c6) ; + S5(c2,2,c6) ; + k = c6+1 ; + S4(c2,2,c6+1) ; + } + c6 = M-1 ; + k = M-1 ; + S3(c2,2,M-1) ; + k = M-1 ; + S5(c2,2,M-1) ; + } + } + if ((M == 3) && (N == 3)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=2;c6<=3;c6++) { + S1(c2,2,c6) ; + } + for (c6=2;c6<=3;c6++) { + S2(c2,2,c6) ; + } + S4(c2,2,2) ; + S3(c2,2,2) ; + S5(c2,2,2) ; + } + } + if ((M == 3) && (N >= 4)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=2;c6<=3;c6++) { + S1(c2,2,c6) ; + } + for (c4=3;c4<=N-1;c4++) { + for (c6=2;c6<=3;c6++) { + j = c4-1 ; + S2(c2,c4-1,c6) ; + } + j = c4-1 ; + S4(c2,c4-1,2) ; + j = c4-1 ; + S3(c2,c4-1,2) ; + j = c4-1 ; + S5(c2,c4-1,2) ; + for (c6=2;c6<=3;c6++) { + S1(c2,c4,c6) ; + } + } + for (c6=2;c6<=3;c6++) { + j = N-1 ; + S2(c2,N-1,c6) ; + } + j = N-1 ; + S4(c2,N-1,2) ; + j = N-1 ; + S3(c2,N-1,2) ; + j = N-1 ; + S5(c2,N-1,2) ; + } + } + if ((M == 2) && (N >= 4)) { + for (c2=2;c2<=O-1;c2++) { + S1(c2,2,2) ; + for (c4=3;c4<=N-1;c4++) { + j = c4-1 ; + S2(c2,c4-1,2) ; + S1(c2,c4,2) ; + } + j = N-1 ; + S2(c2,N-1,2) ; + } + } + if ((M == 2) && (N == 3)) { + for (c2=2;c2<=O-1;c2++) { + S1(c2,2,2) ; + S2(c2,2,2) ; + } + } +} |