diff options
Diffstat (limited to 'cloog-core/test')
403 files changed, 24829 insertions, 0 deletions
diff --git a/cloog-core/test/0D-1.c b/cloog-core/test/0D-1.c new file mode 100644 index 0000000..7f24623 --- /dev/null +++ b/cloog-core/test/0D-1.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/0D-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +S1() ; diff --git a/cloog-core/test/0D-1.cloog b/cloog-core/test/0D-1.cloog new file mode 100644 index 0000000..226e7cb --- /dev/null +++ b/cloog-core/test/0D-1.cloog @@ -0,0 +1,13 @@ +c + +0 2 +0 + +1 + +1 +0 2 +0 0 0 +0 + +0 diff --git a/cloog-core/test/0D-1.good.c b/cloog-core/test/0D-1.good.c new file mode 100644 index 0000000..0a37a56 --- /dev/null +++ b/cloog-core/test/0D-1.good.c @@ -0,0 +1,15 @@ +/* Generated from ../../../git/cloog/test/0D-1.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ +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() { hash(1); } + +void test() +{ + S1() ; +} diff --git a/cloog-core/test/0D-2.c b/cloog-core/test/0D-2.c new file mode 100644 index 0000000..4aa9c17 --- /dev/null +++ b/cloog-core/test/0D-2.c @@ -0,0 +1,4 @@ +/* Generated from ../../../git/cloog/test/0D-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (M >= 0) { + S1() ; +} diff --git a/cloog-core/test/0D-2.cloog b/cloog-core/test/0D-2.cloog new file mode 100644 index 0000000..69f2015 --- /dev/null +++ b/cloog-core/test/0D-2.cloog @@ -0,0 +1,14 @@ +c + +0 3 +0 + +1 + +1 +1 3 +1 1 0 +0 0 0 +0 + +0 diff --git a/cloog-core/test/0D-2.good.c b/cloog-core/test/0D-2.good.c new file mode 100644 index 0000000..65a12c6 --- /dev/null +++ b/cloog-core/test/0D-2.good.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/0D-2.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ +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() { hash(1); } + +void test(int M) +{ + if (M >= 0) { + S1() ; + } +} diff --git a/cloog-core/test/0D-3.c b/cloog-core/test/0D-3.c new file mode 100644 index 0000000..62b4269 --- /dev/null +++ b/cloog-core/test/0D-3.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/0D-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +S1() ; diff --git a/cloog-core/test/0D-3.cloog b/cloog-core/test/0D-3.cloog new file mode 100644 index 0000000..ab4d59c --- /dev/null +++ b/cloog-core/test/0D-3.cloog @@ -0,0 +1,15 @@ +c + +1 3 +1 1 0 +0 + +1 + +1 +1 3 +1 1 0 +0 0 0 +0 + +0 diff --git a/cloog-core/test/0D-3.good.c b/cloog-core/test/0D-3.good.c new file mode 100644 index 0000000..10150eb --- /dev/null +++ b/cloog-core/test/0D-3.good.c @@ -0,0 +1,15 @@ +/* Generated from ../../../git/cloog/test/0D-3.cloog by CLooG 0.14.0-117-g5444fca gmp bits in 0.00s. */ +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() { hash(1); } + +void test(int M) +{ + S1() ; +} diff --git a/cloog-core/test/1point-1.c b/cloog-core/test/1point-1.c new file mode 100644 index 0000000..7c0106b --- /dev/null +++ b/cloog-core/test/1point-1.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/1point-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +S1(2*M,M) ; diff --git a/cloog-core/test/1point-1.cloog b/cloog-core/test/1point-1.cloog new file mode 100644 index 0000000..318d89b --- /dev/null +++ b/cloog-core/test/1point-1.cloog @@ -0,0 +1,23 @@ +# language: C +c + +# Context +#{M | } +1 3 +# M 1 +1 0 1 +0 + +1 # Number of statements + +1 +#{i, j | i=2N; i=2j} +3 5 +# i j M 1 +0 1 0 -2 0 +0 1 -2 0 0 +1 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/1point-1.good.c b/cloog-core/test/1point-1.good.c new file mode 100644 index 0000000..196f8a9 --- /dev/null +++ b/cloog-core/test/1point-1.good.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/1point-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + i = 2*M ; + S1(2*M,M) ; +} diff --git a/cloog-core/test/1point-2.c b/cloog-core/test/1point-2.c new file mode 100644 index 0000000..48f6ad4 --- /dev/null +++ b/cloog-core/test/1point-2.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/1point-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +S1(2*M,N+2) ; diff --git a/cloog-core/test/1point-2.cloog b/cloog-core/test/1point-2.cloog new file mode 100644 index 0000000..66eec58 --- /dev/null +++ b/cloog-core/test/1point-2.cloog @@ -0,0 +1,23 @@ +# language: C +c + +# Context +#{M,N | } +1 4 +# M N 1 +1 0 0 1 +0 + +1 # Number of statements + +1 +# +3 6 +# i j M N 1 +0 1 0 -2 0 0 +0 2 -2 -4 2 4 +1 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/1point-2.good.c b/cloog-core/test/1point-2.good.c new file mode 100644 index 0000000..9880504 --- /dev/null +++ b/cloog-core/test/1point-2.good.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/1point-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + i = 2*M ; + j = N+2 ; + S1(2*M,N+2) ; +} diff --git a/cloog-core/test/4-param.c b/cloog-core/test/4-param.c new file mode 100644 index 0000000..b542796 --- /dev/null +++ b/cloog-core/test/4-param.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/4-param.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.18s. */ +for (i=m;i<=min(n,p-1);i++) { + S1(i) ; +} +for (i=p;i<=min(q,m-1);i++) { + S2(i) ; +} +for (i=max(m,p);i<=min(n,q);i++) { + S1(i) ; + S2(i) ; +} +for (i=max(max(m,p),q+1);i<=n;i++) { + S1(i) ; +} +for (i=max(max(m,p),n+1);i<=q;i++) { + S2(i) ; +} diff --git a/cloog-core/test/4-param.cloog b/cloog-core/test/4-param.cloog new file mode 100644 index 0000000..a19ba08 --- /dev/null +++ b/cloog-core/test/4-param.cloog @@ -0,0 +1,33 @@ +# language: C +c + +# Context +# parameters m n p q +1 6 +# m n p q 1 +1 0 0 0 0 1 +1 +m n p q + +2 # Number of statements + +1 +# S1 i,... +3 7 +# i m n p q 1 +1 1 -1 0 0 0 0 +1 -1 0 1 0 0 0 +1 0 0 0 0 0 1 +0 0 0 + +1 +# +3 7 +# i m n p q 1 +1 1 0 0 -1 0 0 +1 -1 0 0 0 1 0 +1 0 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/4-param.good.c b/cloog-core/test/4-param.good.c new file mode 100644 index 0000000..563b90b --- /dev/null +++ b/cloog-core/test/4-param.good.c @@ -0,0 +1,33 @@ +/* Generated from ../../../git/cloog/test/4-param.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } + +void test(int m, int n, int p, int q) +{ + /* Original iterators. */ + int i; + for (i=m;i<=min(min(n,p-1),q);i++) { + S1(i) ; + } + for (i=p;i<=min(min(q,m-1),n);i++) { + S2(i) ; + } + for (i=max(m,p);i<=min(n,q);i++) { + S1(i) ; + S2(i) ; + } + for (i=max(m,q+1);i<=n;i++) { + S1(i) ; + } + for (i=max(p,n+1);i<=q;i++) { + S2(i) ; + } +} diff --git a/cloog-core/test/Makefile.am b/cloog-core/test/Makefile.am new file mode 100644 index 0000000..aab29d2 --- /dev/null +++ b/cloog-core/test/Makefile.am @@ -0,0 +1,412 @@ +# +# /**-------------------------------------------------------------------** +# ** CLooG ** +# **-------------------------------------------------------------------** +# ** makefile ** +# **-------------------------------------------------------------------** +# ** First version: march 6th 2003 ** +# **-------------------------------------------------------------------**/ +# +# makefile for checking. + +#/***************************************************************************** +# * CLooG : the Chunky Loop Generator (experimental) * +# ***************************************************************************** +# * * +# * Copyright (C) 2003 Cedric Bastoul * +# * * +# * This library is free software; you can redistribute it and/or * +# * modify it under the terms of the GNU Lesser General Public * +# * License as published by the Free Software Foundation; either * +# * version 2.1 of the License, or (at your option) any later version. * +# * * +# * This library is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# * Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Lesser General Public * +# * License along with this library; if not, write to the Free Software * +# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * +# * Boston, MA 02110-1301 USA * +# * * +# * CLooG, the Chunky Loop Generator * +# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * +# * This file has been written with the help of the Bart Kienhuis's checking * +# * makefile for PipLib. * +# * * +# *****************************************************************************/ + +if NO_ISL +GENERATE_TEST = +else +GENERATE_TEST = generate_test +endif +noinst_PROGRAMS = $(GENERATE_TEST) +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include +LDADD = ../libcloog-isl.la +generate_test_SOURCES = generate_test.c + +FORCE: +../libcloog-isl.la: FORCE + cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la + +ROOT = .. + +FINITE_CLOOGTEST_C = \ + 0D-1 \ + 0D-2 \ + 0D-3 \ + 1point-1 \ + 1point-2 \ + 4-param \ + basic-bounds-1 \ + basic-bounds-2 \ + basic-bounds-3 \ + basic-bounds-4 \ + basic-bounds-5 \ + basic-bounds-6 \ + block \ + block2 \ + byu98-1-2-3 \ + cholesky \ + cholesky2 \ + classen \ + classen2 \ + constant \ + constbound \ + darte \ + dealII \ + donotsimp \ + dot \ + dot2 \ + double \ + durbin_e_s \ + emploi \ + esced \ + ex1 \ + forwardsub-1-1-2 \ + forwardsub-2-1-2-3 \ + forwardsub-3-1-2 \ + gauss \ + gesced \ + gesced2 \ + gesced3 \ + guide \ + iftest \ + iftest2 \ + largeur \ + levenshtein-1-2-3 \ + lex \ + lineality-1-2 \ + lineality-2-1-2 \ + logo \ + logopar \ + lu \ + lu2 \ + lub \ + lux \ + min-1-1 \ + min-2-1 \ + min-3-1 \ + min-4-1 \ + mode \ + multi-mm-1 \ + no_lindep \ + orc \ + rectangle \ + singleton \ + square+triangle-1-1-2-3 \ + swim \ + test \ + thomasset \ + tiling \ + uday_scalars \ + union \ + vivien \ + vivien2 \ + walters \ + walters2 \ + walters3 \ + wavefront \ + yosr \ + yosr2 \ + ./non_optimal/nul_complex1 \ + ./non_optimal/usvd_e_t \ + ./non_optimal/youcef \ + ./reservoir/cholesky2 \ + ./reservoir/fusion1 \ + ./reservoir/fusion2 \ + ./reservoir/jacobi2 \ + ./reservoir/jacobi3 \ + ./reservoir/lim-lam1 \ + ./reservoir/lim-lam2 \ + ./reservoir/lim-lam3 \ + ./reservoir/lim-lam4 \ + ./reservoir/lim-lam5 \ + ./reservoir/lim-lam6 \ + ./reservoir/liu-zhuge1 \ + ./reservoir/loechner3 \ + ./reservoir/loechner4 \ + ./reservoir/loechner5 \ + ./reservoir/mg-interp2 \ + ./reservoir/mg-interp \ + ./reservoir/mg-psinv \ + ./reservoir/mg-resid \ + ./reservoir/mg-rprj3 \ + ./reservoir/pingali1 \ + ./reservoir/pingali2 \ + ./reservoir/pingali3 \ + ./reservoir/pingali4 \ + ./reservoir/pingali5 \ + ./reservoir/pingali6 \ + ./reservoir/QR \ + ./reservoir/tang-xue1 \ + ./reservoir/two + +CLOOG_ISL_TEST_C = \ + isl/mod \ + isl/mod2 \ + isl/mod3 \ + isl/mod4 + +CLOOGTEST_C = \ + infinite \ + infinite2 \ + infinite3 \ + infinite4 \ + $(FINITE_CLOOGTEST_C) \ + $(CLOOG_ISL_TEST_C) + +# ./reservoir/long \ +# faber + +CLOOGTEST_FORTRAN = \ + dartef \ + iftestf \ + levenshtein-1-2-3f \ + yosrf + +CLOOGTEST_STRIDED = \ + basic-bounds-2 \ + mod4 \ + nul_basic1 \ + nul_basic2 \ + nul_lcpc \ + multi-stride \ + multi-stride2 \ + stride3 \ + stride4 \ + reservoir/bastoul3 \ + reservoir/stride \ + reservoir/stride2 + +SPECIAL_TESTS = \ + vasilache \ + merge \ + equality \ + equality2 \ + otl \ + param-split \ + stride \ + stride2 \ + sor1d +SPECIAL_OPTIONS = \ + 'vasilache -f 8 -l 9' \ + 'merge -f -1' \ + 'equality -f -1 -l 2 -override' \ + 'equality2 -f -1 -l 4 -esp 1 -override' \ + 'otl -block 1 -esp 0 -otl 0' \ + 'param-split -f -1' \ + 'stride -f -1 -strides 1' \ + 'stride2 -f -1 -strides 1' \ + 'sor1d -f -1' + +EXTRA_DIST = \ + $(CLOOGTEST_C:%=%.cloog) \ + $(CLOOGTEST_C:%=%.c) \ + $(FINITE_CLOOGTEST_C:%=%.good.c) \ + $(CLOOGTEST_FORTRAN:%=%.cloog) \ + $(CLOOGTEST_FORTRAN:%=%.f) \ + $(CLOOGTEST_STRIDED:%=%.cloog) \ + $(CLOOGTEST_STRIDED:%=%.c) \ + $(SPECIAL_TESTS:%=%.cloog) \ + $(SPECIAL_TESTS:%=%.c) \ + $(SPECIAL_TESTS:%=%.good.c) + +generate: + @echo " /*-----------------------------------------------*" + @echo " * Generate files *" + @echo " *-----------------------------------------------*/" + @for x in $(CLOOGTEST_C) ; do \ + echo "Generate $$x.c" ; \ + $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \ + done ; \ + for x in $(CLOOGTEST_FORTRAN) ; do \ + echo "Generate $$x.f" ; \ + $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \ + done ; \ + for x in $(CLOOGTEST_STRIDED) ; do \ + echo "Generate $$x.c" ; \ + $(top_builddir)/cloog $(srcdir)/$$x.cloog \ + -strides 1 -o $(srcdir)/$$x.c ; \ + done ; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo "Generate file $$x ($$options)" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ + $$options > $(srcdir)/$$x.c ; \ + done; done + +generate_good: + @for x in $(FINITE_CLOOGTEST_C) ; do \ + echo "Generate $$x.good.c" ; \ + $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ + done; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo "Generate $$x.good.c ($$options)" ; \ + $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ + done; done + +valgrind: + @echo " /*-----------------------------------------------*" + @echo " * Checking files by Valgrind *" + @echo " *-----------------------------------------------*/" + for x in $(CLOOGTEST_C) ; do \ + echo "Valgrinding $$x.c" ; \ + valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ + done ; \ + for x in $(CLOOGTEST_FORTRAN) ; do \ + echo "Valgrinding $$x.f" ; \ + valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ + done + +test_run: generate_test$(EXEEXT) + @echo " /*-----------------------------------------------*" + @echo " * Testing CLooG *" + @echo " *-----------------------------------------------*/" + @failedtest=0 ; \ + echo "--- Testing C files... (correct output)" ; \ + for x in $(FINITE_CLOOGTEST_C) ; do \ + echo -n "Verify file $$x... " ; \ + echo -n "generating... " ; \ + $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $(srcdir)/$$x.cloog > test_test.c ; \ + ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ + echo -n "compiling... " ; \ + $(COMPILE) -c test_test.c; \ + $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ + $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ + echo -n "comparing... " ; \ + ./test_run$(EXEEXT); \ + result=$$?; \ + if test "$$result" -ne "0" ; then \ + failedtest=`expr $$failedtest + 1` ; \ + fi; \ + $(RM) $@; \ + echo; \ + done; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo -n "Verify file $$x ($$options)... " ; \ + echo -n "generating... " ; \ + $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options $(srcdir)/$$x.cloog > test_test.c ; \ + ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ + echo -n "compiling... " ; \ + $(COMPILE) -c test_test.c; \ + $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ + $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ + echo -n "comparing... " ; \ + ./test_run$(EXEEXT); \ + result=$$?; \ + if test "$$result" -ne "0" ; then \ + failedtest=`expr $$failedtest + 1` ; \ + fi; \ + $(RM) $@; \ + echo; \ + done; done; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo -n "Verify file $$x ($$options -sh 1)... " ; \ + echo -n "generating... " ; \ + $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options -sh 1 $(srcdir)/$$x.cloog > test_test.c ; \ + ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ + echo -n "compiling... " ; \ + $(COMPILE) -c test_test.c; \ + $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ + $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ + echo -n "comparing... " ; \ + ./test_run$(EXEEXT); \ + result=$$?; \ + if test "$$result" -ne "0" ; then \ + failedtest=`expr $$failedtest + 1` ; \ + fi; \ + $(RM) $@; \ + echo; \ + done; done; \ + if [ $$failedtest != 0 ] ; then \ + echo "$$failedtest tests failed" ; \ + else \ + echo "CLooG works correctly :-) !" ; \ + fi +test: + @echo " /*-----------------------------------------------*" + @echo " * Testing CLooG *" + @echo " *-----------------------------------------------*/" + @failedtest=0 ; \ + echo "--- Testing C files... (expected output)" ; \ + for x in $(CLOOGTEST_C) ; do \ + echo "Verify file $$x" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done ; \ + echo "--- Testing FORTRAN files..." ; \ + for x in $(CLOOGTEST_FORTRAN) ; do \ + echo "Verify file $$x" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.f ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done ; \ + echo "--- Testing STRIDED files..." ; \ + for x in $(CLOOGTEST_STRIDED) ; do \ + echo "Verify file $$x" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ + -strides 1 > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done ; \ + echo "--- Testing SPECIAL OPTIONS files..." ; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo "Verify file $$x ($$options)" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ + $$options > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done; done; \ + rm ttemp ; \ + if [ $$failedtest != 0 ] ; then \ + echo "$$failedtest tests failed" ; \ + else \ + echo "CLooG works correctly :-) !" ; \ + fi diff --git a/cloog-core/test/Makefile.in b/cloog-core/test/Makefile.in new file mode 100644 index 0000000..da92894 --- /dev/null +++ b/cloog-core/test/Makefile.in @@ -0,0 +1,897 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# /**-------------------------------------------------------------------** +# ** CLooG ** +# **-------------------------------------------------------------------** +# ** makefile ** +# **-------------------------------------------------------------------** +# ** First version: march 6th 2003 ** +# **-------------------------------------------------------------------**/ +# +# makefile for checking. + +#/***************************************************************************** +# * CLooG : the Chunky Loop Generator (experimental) * +# ***************************************************************************** +# * * +# * Copyright (C) 2003 Cedric Bastoul * +# * * +# * This library is free software; you can redistribute it and/or * +# * modify it under the terms of the GNU Lesser General Public * +# * License as published by the Free Software Foundation; either * +# * version 2.1 of the License, or (at your option) any later version. * +# * * +# * This library is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# * Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Lesser General Public * +# * License along with this library; if not, write to the Free Software * +# * Foundation, Inc., 51 Franklin Street, Fifth Floor, * +# * Boston, MA 02110-1301 USA * +# * * +# * CLooG, the Chunky Loop Generator * +# * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * +# * This file has been written with the help of the Bart Kienhuis's checking * +# * makefile for PipLib. * +# * * +# *****************************************************************************/ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = $(am__EXEEXT_1) +subdir = test +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cc_maxopt.m4 \ + $(top_srcdir)/m4/ax_cflags_warn_all.m4 \ + $(top_srcdir)/m4/ax_check_compiler_flags.m4 \ + $(top_srcdir)/m4/ax_compiler_vendor.m4 \ + $(top_srcdir)/m4/ax_create_pkgconfig_info.m4 \ + $(top_srcdir)/m4/ax_gcc_archflag.m4 \ + $(top_srcdir)/m4/ax_gcc_x86_cpuid.m4 \ + $(top_srcdir)/m4/ax_submodule.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@NO_ISL_FALSE@am__EXEEXT_1 = generate_test$(EXEEXT) +PROGRAMS = $(noinst_PROGRAMS) +am_generate_test_OBJECTS = generate_test.$(OBJEXT) +generate_test_OBJECTS = $(am_generate_test_OBJECTS) +generate_test_LDADD = $(LDADD) +generate_test_DEPENDENCIES = ../libcloog-isl.la +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(generate_test_SOURCES) +DIST_SOURCES = $(generate_test_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BITS = @BITS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CD = @CD@ +CFLAGS = @CFLAGS@ +CFLAGS_WARN = @CFLAGS_WARN@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GIT_INDEX = @GIT_INDEX@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +ISL_CPPFLAGS = @ISL_CPPFLAGS@ +ISL_LDFLAGS = @ISL_LDFLAGS@ +ISL_LIBS = @ISL_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PRTDIAG = @PRTDIAG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +TEXI2DVI = @TEXI2DVI@ +VERSION = @VERSION@ +VERSION_MAJOR = @VERSION_MAJOR@ +VERSION_MINOR = @VERSION_MINOR@ +VERSION_REVISION = @VERSION_REVISION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgconfig_libdir = @pkgconfig_libdir@ +pkgconfig_libfile = @pkgconfig_libfile@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +versioninfo = @versioninfo@ +@NO_ISL_FALSE@GENERATE_TEST = generate_test +@NO_ISL_TRUE@GENERATE_TEST = +INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include +LDADD = ../libcloog-isl.la +generate_test_SOURCES = generate_test.c +ROOT = .. +FINITE_CLOOGTEST_C = \ + 0D-1 \ + 0D-2 \ + 0D-3 \ + 1point-1 \ + 1point-2 \ + 4-param \ + basic-bounds-1 \ + basic-bounds-2 \ + basic-bounds-3 \ + basic-bounds-4 \ + basic-bounds-5 \ + basic-bounds-6 \ + block \ + block2 \ + byu98-1-2-3 \ + cholesky \ + cholesky2 \ + classen \ + classen2 \ + constant \ + constbound \ + darte \ + dealII \ + donotsimp \ + dot \ + dot2 \ + double \ + durbin_e_s \ + emploi \ + esced \ + ex1 \ + forwardsub-1-1-2 \ + forwardsub-2-1-2-3 \ + forwardsub-3-1-2 \ + gauss \ + gesced \ + gesced2 \ + gesced3 \ + guide \ + iftest \ + iftest2 \ + largeur \ + levenshtein-1-2-3 \ + lex \ + lineality-1-2 \ + lineality-2-1-2 \ + logo \ + logopar \ + lu \ + lu2 \ + lub \ + lux \ + min-1-1 \ + min-2-1 \ + min-3-1 \ + min-4-1 \ + mode \ + multi-mm-1 \ + no_lindep \ + orc \ + rectangle \ + singleton \ + square+triangle-1-1-2-3 \ + swim \ + test \ + thomasset \ + tiling \ + uday_scalars \ + union \ + vivien \ + vivien2 \ + walters \ + walters2 \ + walters3 \ + wavefront \ + yosr \ + yosr2 \ + ./non_optimal/nul_complex1 \ + ./non_optimal/usvd_e_t \ + ./non_optimal/youcef \ + ./reservoir/cholesky2 \ + ./reservoir/fusion1 \ + ./reservoir/fusion2 \ + ./reservoir/jacobi2 \ + ./reservoir/jacobi3 \ + ./reservoir/lim-lam1 \ + ./reservoir/lim-lam2 \ + ./reservoir/lim-lam3 \ + ./reservoir/lim-lam4 \ + ./reservoir/lim-lam5 \ + ./reservoir/lim-lam6 \ + ./reservoir/liu-zhuge1 \ + ./reservoir/loechner3 \ + ./reservoir/loechner4 \ + ./reservoir/loechner5 \ + ./reservoir/mg-interp2 \ + ./reservoir/mg-interp \ + ./reservoir/mg-psinv \ + ./reservoir/mg-resid \ + ./reservoir/mg-rprj3 \ + ./reservoir/pingali1 \ + ./reservoir/pingali2 \ + ./reservoir/pingali3 \ + ./reservoir/pingali4 \ + ./reservoir/pingali5 \ + ./reservoir/pingali6 \ + ./reservoir/QR \ + ./reservoir/tang-xue1 \ + ./reservoir/two + +CLOOG_ISL_TEST_C = \ + isl/mod \ + isl/mod2 \ + isl/mod3 \ + isl/mod4 + +CLOOGTEST_C = \ + infinite \ + infinite2 \ + infinite3 \ + infinite4 \ + $(FINITE_CLOOGTEST_C) \ + $(CLOOG_ISL_TEST_C) + + +# ./reservoir/long \ +# faber +CLOOGTEST_FORTRAN = \ + dartef \ + iftestf \ + levenshtein-1-2-3f \ + yosrf + +CLOOGTEST_STRIDED = \ + basic-bounds-2 \ + mod4 \ + nul_basic1 \ + nul_basic2 \ + nul_lcpc \ + multi-stride \ + multi-stride2 \ + stride3 \ + stride4 \ + reservoir/bastoul3 \ + reservoir/stride \ + reservoir/stride2 + +SPECIAL_TESTS = \ + vasilache \ + merge \ + equality \ + equality2 \ + otl \ + param-split \ + stride \ + stride2 \ + sor1d + +SPECIAL_OPTIONS = \ + 'vasilache -f 8 -l 9' \ + 'merge -f -1' \ + 'equality -f -1 -l 2 -override' \ + 'equality2 -f -1 -l 4 -esp 1 -override' \ + 'otl -block 1 -esp 0 -otl 0' \ + 'param-split -f -1' \ + 'stride -f -1 -strides 1' \ + 'stride2 -f -1 -strides 1' \ + 'sor1d -f -1' + +EXTRA_DIST = \ + $(CLOOGTEST_C:%=%.cloog) \ + $(CLOOGTEST_C:%=%.c) \ + $(FINITE_CLOOGTEST_C:%=%.good.c) \ + $(CLOOGTEST_FORTRAN:%=%.cloog) \ + $(CLOOGTEST_FORTRAN:%=%.f) \ + $(CLOOGTEST_STRIDED:%=%.cloog) \ + $(CLOOGTEST_STRIDED:%=%.c) \ + $(SPECIAL_TESTS:%=%.cloog) \ + $(SPECIAL_TESTS:%=%.c) \ + $(SPECIAL_TESTS:%=%.good.c) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign test/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +generate_test$(EXEEXT): $(generate_test_OBJECTS) $(generate_test_DEPENDENCIES) + @rm -f generate_test$(EXEEXT) + $(LINK) $(generate_test_OBJECTS) $(generate_test_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generate_test.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +FORCE: +../libcloog-isl.la: FORCE + cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la + +generate: + @echo " /*-----------------------------------------------*" + @echo " * Generate files *" + @echo " *-----------------------------------------------*/" + @for x in $(CLOOGTEST_C) ; do \ + echo "Generate $$x.c" ; \ + $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \ + done ; \ + for x in $(CLOOGTEST_FORTRAN) ; do \ + echo "Generate $$x.f" ; \ + $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \ + done ; \ + for x in $(CLOOGTEST_STRIDED) ; do \ + echo "Generate $$x.c" ; \ + $(top_builddir)/cloog $(srcdir)/$$x.cloog \ + -strides 1 -o $(srcdir)/$$x.c ; \ + done ; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo "Generate file $$x ($$options)" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ + $$options > $(srcdir)/$$x.c ; \ + done; done + +generate_good: + @for x in $(FINITE_CLOOGTEST_C) ; do \ + echo "Generate $$x.good.c" ; \ + $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ + done; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo "Generate $$x.good.c ($$options)" ; \ + $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \ + done; done + +valgrind: + @echo " /*-----------------------------------------------*" + @echo " * Checking files by Valgrind *" + @echo " *-----------------------------------------------*/" + for x in $(CLOOGTEST_C) ; do \ + echo "Valgrinding $$x.c" ; \ + valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ + done ; \ + for x in $(CLOOGTEST_FORTRAN) ; do \ + echo "Valgrinding $$x.f" ; \ + valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \ + done + +test_run: generate_test$(EXEEXT) + @echo " /*-----------------------------------------------*" + @echo " * Testing CLooG *" + @echo " *-----------------------------------------------*/" + @failedtest=0 ; \ + echo "--- Testing C files... (correct output)" ; \ + for x in $(FINITE_CLOOGTEST_C) ; do \ + echo -n "Verify file $$x... " ; \ + echo -n "generating... " ; \ + $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $(srcdir)/$$x.cloog > test_test.c ; \ + ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ + echo -n "compiling... " ; \ + $(COMPILE) -c test_test.c; \ + $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ + $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ + echo -n "comparing... " ; \ + ./test_run$(EXEEXT); \ + result=$$?; \ + if test "$$result" -ne "0" ; then \ + failedtest=`expr $$failedtest + 1` ; \ + fi; \ + $(RM) $@; \ + echo; \ + done; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo -n "Verify file $$x ($$options)... " ; \ + echo -n "generating... " ; \ + $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options $(srcdir)/$$x.cloog > test_test.c ; \ + ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ + echo -n "compiling... " ; \ + $(COMPILE) -c test_test.c; \ + $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ + $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ + echo -n "comparing... " ; \ + ./test_run$(EXEEXT); \ + result=$$?; \ + if test "$$result" -ne "0" ; then \ + failedtest=`expr $$failedtest + 1` ; \ + fi; \ + $(RM) $@; \ + echo; \ + done; done; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo -n "Verify file $$x ($$options -sh 1)... " ; \ + echo -n "generating... " ; \ + $(top_builddir)/cloog$(EXEEXT) -q -callable 1 $$options -sh 1 $(srcdir)/$$x.cloog > test_test.c ; \ + ./generate_test$(EXEEXT) < $(srcdir)/$$x.cloog > test_main.c; \ + echo -n "compiling... " ; \ + $(COMPILE) -c test_test.c; \ + $(COMPILE) -Dtest=good -c $(srcdir)/$$x.good.c -o test_good.o; \ + $(LINK) test_main.c test_test.o test_good.o > /dev/null; \ + echo -n "comparing... " ; \ + ./test_run$(EXEEXT); \ + result=$$?; \ + if test "$$result" -ne "0" ; then \ + failedtest=`expr $$failedtest + 1` ; \ + fi; \ + $(RM) $@; \ + echo; \ + done; done; \ + if [ $$failedtest != 0 ] ; then \ + echo "$$failedtest tests failed" ; \ + else \ + echo "CLooG works correctly :-) !" ; \ + fi +test: + @echo " /*-----------------------------------------------*" + @echo " * Testing CLooG *" + @echo " *-----------------------------------------------*/" + @failedtest=0 ; \ + echo "--- Testing C files... (expected output)" ; \ + for x in $(CLOOGTEST_C) ; do \ + echo "Verify file $$x" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done ; \ + echo "--- Testing FORTRAN files..." ; \ + for x in $(CLOOGTEST_FORTRAN) ; do \ + echo "Verify file $$x" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.f ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done ; \ + echo "--- Testing STRIDED files..." ; \ + for x in $(CLOOGTEST_STRIDED) ; do \ + echo "Verify file $$x" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ + -strides 1 > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done ; \ + echo "--- Testing SPECIAL OPTIONS files..." ; \ + for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \ + echo "Verify file $$x ($$options)" ; \ + $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \ + $$options > ttemp ; \ + diff -u -w --ignore-matching-lines='CLooG' ttemp $(srcdir)/$$x.c ; \ + result=$$?; \ + if [ "$$result" -ne "0" ] ; then \ + echo "!!! Error: $$x is not the same" ; \ + failedtest=`expr $$failedtest + 1` ; \ + else \ + echo "$$x passed" ; \ + fi ; \ + done; done; \ + rm ttemp ; \ + if [ $$failedtest != 0 ] ; then \ + echo "$$failedtest tests failed" ; \ + else \ + echo "CLooG works correctly :-) !" ; \ + fi + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/cloog-core/test/basic-bounds-1.c b/cloog-core/test/basic-bounds-1.c new file mode 100644 index 0000000..1ddede1 --- /dev/null +++ b/cloog-core/test/basic-bounds-1.c @@ -0,0 +1,4 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (i=0;i<=2;i++) { + S1(i) ; +} diff --git a/cloog-core/test/basic-bounds-1.cloog b/cloog-core/test/basic-bounds-1.cloog new file mode 100644 index 0000000..1c3ac40 --- /dev/null +++ b/cloog-core/test/basic-bounds-1.cloog @@ -0,0 +1,21 @@ +# language: C +c + +# Context +1 2 +1 1 +0 + +1 # Number of statements + +1 +# +3 3 +# i 1 +1 1 0 +1 -1 2 +1 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/basic-bounds-1.good.c b/cloog-core/test/basic-bounds-1.good.c new file mode 100644 index 0000000..ab53e94 --- /dev/null +++ b/cloog-core/test/basic-bounds-1.good.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } + +void test() +{ + /* Original iterators. */ + int i; + for (i=0;i<=2;i++) { + S1(i) ; + } +} diff --git a/cloog-core/test/basic-bounds-2.c b/cloog-core/test/basic-bounds-2.c new file mode 100644 index 0000000..38780ff --- /dev/null +++ b/cloog-core/test/basic-bounds-2.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +S1(0) ; diff --git a/cloog-core/test/basic-bounds-2.cloog b/cloog-core/test/basic-bounds-2.cloog new file mode 100644 index 0000000..45a51ba --- /dev/null +++ b/cloog-core/test/basic-bounds-2.cloog @@ -0,0 +1,21 @@ +# language: C +c + +# Context +1 2 +1 1 +0 + +1 # Number of statements + +1 +# +3 3 +# i 1 +1 3 0 +1 -3 2 +1 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/basic-bounds-2.good.c b/cloog-core/test/basic-bounds-2.good.c new file mode 100644 index 0000000..48544ff --- /dev/null +++ b/cloog-core/test/basic-bounds-2.good.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } + +void test() +{ + /* Original iterators. */ + int i; + S1(0) ; +} diff --git a/cloog-core/test/basic-bounds-3.c b/cloog-core/test/basic-bounds-3.c new file mode 100644 index 0000000..f5fdaf8 --- /dev/null +++ b/cloog-core/test/basic-bounds-3.c @@ -0,0 +1,4 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (i=0;i<=M;i++) { + S1(i) ; +} diff --git a/cloog-core/test/basic-bounds-3.cloog b/cloog-core/test/basic-bounds-3.cloog new file mode 100644 index 0000000..f3ad8bc --- /dev/null +++ b/cloog-core/test/basic-bounds-3.cloog @@ -0,0 +1,23 @@ +# language: C +c + +# Context +2 3 +# M 1 +1 1 0 +1 0 1 +0 + +1 # Number of statements + +1 +# +3 4 +# i M 1 +1 1 0 0 +1 -1 1 0 +1 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/basic-bounds-3.good.c b/cloog-core/test/basic-bounds-3.good.c new file mode 100644 index 0000000..c5c0f7c --- /dev/null +++ b/cloog-core/test/basic-bounds-3.good.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } + +void test(int M) +{ + /* Original iterators. */ + int i; + for (i=0;i<=M;i++) { + S1(i) ; + } +} diff --git a/cloog-core/test/basic-bounds-4.c b/cloog-core/test/basic-bounds-4.c new file mode 100644 index 0000000..1f15c42 --- /dev/null +++ b/cloog-core/test/basic-bounds-4.c @@ -0,0 +1,4 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (i=0;i<=M+1;i++) { + S1(i) ; +} diff --git a/cloog-core/test/basic-bounds-4.cloog b/cloog-core/test/basic-bounds-4.cloog new file mode 100644 index 0000000..5e76687 --- /dev/null +++ b/cloog-core/test/basic-bounds-4.cloog @@ -0,0 +1,23 @@ +# language: C +c + +# Context +2 3 +# M 1 +1 1 0 +1 0 1 +0 + +1 # Number of statements + +1 +# +3 4 +# i M 1 +1 1 0 0 +1 -1 1 1 +1 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/basic-bounds-4.good.c b/cloog-core/test/basic-bounds-4.good.c new file mode 100644 index 0000000..310c948 --- /dev/null +++ b/cloog-core/test/basic-bounds-4.good.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } + +void test(int M) +{ + /* Original iterators. */ + int i; + for (i=0;i<=M+1;i++) { + S1(i) ; + } +} diff --git a/cloog-core/test/basic-bounds-5.c b/cloog-core/test/basic-bounds-5.c new file mode 100644 index 0000000..1761b56 --- /dev/null +++ b/cloog-core/test/basic-bounds-5.c @@ -0,0 +1,3 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +j = floord(M+1,2) ; +S1(1,j) ; diff --git a/cloog-core/test/basic-bounds-5.cloog b/cloog-core/test/basic-bounds-5.cloog new file mode 100644 index 0000000..855a9bb --- /dev/null +++ b/cloog-core/test/basic-bounds-5.cloog @@ -0,0 +1,22 @@ +# language: C +c + +# Context +1 3 +# M 1 +1 0 1 +0 + +1 # Number of statements + +1 +# {i,j,N | i=1; 2j-1<=N<=2j} +3 5 +# i j M 1 +0 1 0 0 -1 +1 0 2 -1 0 +1 0 -2 1 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/basic-bounds-5.good.c b/cloog-core/test/basic-bounds-5.good.c new file mode 100644 index 0000000..3e669c0 --- /dev/null +++ b/cloog-core/test/basic-bounds-5.good.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + j = floord(M+1,2) ; + S1(1,j) ; +} diff --git a/cloog-core/test/basic-bounds-6.c b/cloog-core/test/basic-bounds-6.c new file mode 100644 index 0000000..449ad37 --- /dev/null +++ b/cloog-core/test/basic-bounds-6.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +S1(-1) ; diff --git a/cloog-core/test/basic-bounds-6.cloog b/cloog-core/test/basic-bounds-6.cloog new file mode 100644 index 0000000..2acc2ab --- /dev/null +++ b/cloog-core/test/basic-bounds-6.cloog @@ -0,0 +1,20 @@ +# language: C +c + +# Context +1 2 +1 1 +0 + +1 # Number of statements + +1 +3 3 +# i 1 +1 2 3 +1 -2 -1 +1 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/basic-bounds-6.good.c b/cloog-core/test/basic-bounds-6.good.c new file mode 100644 index 0000000..a993e2f --- /dev/null +++ b/cloog-core/test/basic-bounds-6.good.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/basic-bounds-6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } + +void test() +{ + /* Original iterators. */ + int i; + S1(-1) ; +} diff --git a/cloog-core/test/block.c b/cloog-core/test/block.c new file mode 100644 index 0000000..2ba5668 --- /dev/null +++ b/cloog-core/test/block.c @@ -0,0 +1,5 @@ +/* Generated from /home/skimo/git/cloog/test/block.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.00s. */ +S1(); +S3(0); +S2(); +S3(1); diff --git a/cloog-core/test/block.cloog b/cloog-core/test/block.cloog new file mode 100644 index 0000000..9913b74 --- /dev/null +++ b/cloog-core/test/block.cloog @@ -0,0 +1,42 @@ +c + +0 2 + +0 + +3 + +1 +0 2 + +0 0 0 + +1 +0 2 + +0 0 0 + +1 +2 3 +1 1 0 +1 -1 1 + +0 0 0 + +0 + +3 + +2 4 +0 -1 0 0 # c1 = 0 +0 0 -1 0 # c2 = 0 + +2 4 +0 -1 0 1 # c1 = 1 +0 0 -1 0 # c2 = 0 + +2 5 +0 -1 0 1 0 # c1 = i +0 0 -1 0 1 # c2 = 1 + +0 diff --git a/cloog-core/test/block.good.c b/cloog-core/test/block.good.c new file mode 100644 index 0000000..b2f280f --- /dev/null +++ b/cloog-core/test/block.good.c @@ -0,0 +1,24 @@ +/* Generated from /home/skimo/git/cloog/test/block.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.00s. */ +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() { hash(1); } +#define S2() { hash(2); } +#define S3(i) { hash(3); hash(i); } + +void test() +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i; + S1(); + S3(0); + S2(); + S3(1); +} diff --git a/cloog-core/test/block2.c b/cloog-core/test/block2.c new file mode 100644 index 0000000..7209a10 --- /dev/null +++ b/cloog-core/test/block2.c @@ -0,0 +1,6 @@ +/* Generated from /home/skimo/git/cloog/test/block2.cloog by CLooG 0.14.0-302-g309b32c gmp bits in 0.01s. */ +for (c0=0;c0<=9;c0++) { + S1(c0,1); + S3(c0,1); + S2(c0,1); +} diff --git a/cloog-core/test/block2.cloog b/cloog-core/test/block2.cloog new file mode 100644 index 0000000..866c634 --- /dev/null +++ b/cloog-core/test/block2.cloog @@ -0,0 +1,77 @@ +# CLooG -> CLooG +# This is an automatic dump of a CLooG input file from a CloogInput data +# structure. + +# Language: C +c + +# Context: +0 2 + +0 # Parameter name(s) + +# Statement number: +3 + +# Iteration domain of statement 5 (ND_1IP_ED_0_0_V_0). +1 + +3 4 +0 0 1 -1 +1 1 0 0 +1 -1 0 9 + +0 0 0 # For future options. + +# Iteration domain of statement 6 (ND_1OP_ED_3_0_V_1). +1 + +3 4 +0 0 1 -1 +1 1 0 0 +1 -1 0 9 + +0 0 0 # For future options. + +# Iteration domain of statement 7 (ND_1). +1 + +3 4 +0 0 1 -1 +1 1 0 0 +1 -1 0 9 + +0 0 0 # For future options. + + +0 # Iterator name(s) + +# --------------------- SCATTERING -------------------- +3 # Scattering functions + +# Scattering of statement 5 (ND_1IP_ED_0_0_V_0). +1 + +3 7 +0 0 0 1 0 0 -6 +0 0 1 0 0 -1 0 +0 1 0 0 -1 0 0 + +# Scattering of statement 6 (ND_1OP_ED_3_0_V_1). +1 + +3 7 +0 0 0 1 0 0 -11 +0 0 1 0 0 -1 0 +0 1 0 0 -1 0 0 + +# Scattering of statement 7 (ND_1). +1 + +3 7 +0 0 0 1 0 0 -8 +0 0 1 0 0 -1 0 +0 1 0 0 -1 0 0 + +1 # Scattering dimension name(s) +c0 c1 c2 diff --git a/cloog-core/test/block2.good.c b/cloog-core/test/block2.good.c new file mode 100644 index 0000000..23a4942 --- /dev/null +++ b/cloog-core/test/block2.good.c @@ -0,0 +1,25 @@ +/* Generated from /home/skimo/git/cloog/test/block2.cloog by CLooG 0.14.0-302-g309b32c gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } + +void test() +{ + /* Scattering iterators. */ + int c0, c1; + /* Original iterators. */ + int i, j; + for (c0=0;c0<=9;c0++) { + S1(c0,1); + S3(c0,1); + S2(c0,1); + } +} diff --git a/cloog-core/test/byu98-1-2-3.c b/cloog-core/test/byu98-1-2-3.c new file mode 100644 index 0000000..2a1e151 --- /dev/null +++ b/cloog-core/test/byu98-1-2-3.c @@ -0,0 +1,24 @@ +/* Generated from /home/skimo/git/cloog/test/byu98-1-2-3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ +for (i=2;i<=3;i++) { + for (j=-i+6;j<=6;j++) { + S1(i,j); + } +} +for (i=4;i<=7;i++) { + if (i == 4) { + for (j=3;j<=4;j++) { + S1(i,j); + } + } + if (i >= 6) { + S2(i,-i+9); + } + if (i <= 5) { + S1(i,-i+9); + S2(i,-i+9); + } + for (j=max(-i+10,i-1);j<=6;j++) { + S1(i,j); + } +} +S2(8,1); diff --git a/cloog-core/test/byu98-1-2-3.cloog b/cloog-core/test/byu98-1-2-3.cloog new file mode 100644 index 0000000..76d16ab --- /dev/null +++ b/cloog-core/test/byu98-1-2-3.cloog @@ -0,0 +1,65 @@ +# Here is the result given by an old CLooG (the same was given up to 0.12.2), +# the difference with the new constant spreading technique of 0.14.0 is +# one of the most beautiful. +# +# /* Generated by CLooG v0.10.7 */ +# for (i=2;i<=3;i++) { +# for (j=-i+6;j<=6;j++) { +# S1 ; +# } +# } +# for (j=4-1;j<=-(4)+8;j++) { +# S1(i = 4) ; +# } +# j = -(4)+9 ; +# S1(i = 4) ; +# S2(i = 4) ; +# for (j=-(4)+10;j<=6;j++) { +# S1(i = 4) ; +# } +# S1(i = 5,j = 4) ; +# S2(i = 5,j = 4) ; +# for (j=5;j<=6;j++) { +# S1(i = 5) ; +# } +# for (i=6;i<=7;i++) { +# j = -i+9 ; +# S2 ; +# for (j=i-1;j<=6;j++) { +# S1 ; +# } +# } +# S2(i = 8,j = 1) ; + +# language: C +c + +# Context +#{ | 1>=0} +1 2 +1 1 +0 + +2 # Number of statements + +1 +# {i,j | (-j+6,2)<=i<=j+1; 3<=j<=6} +5 4 +# i j 1 +1 1 1 -6 +1 1 0 -2 +1 0 1 -3 +1 0 -1 6 +1 -1 1 1 +0 0 0 + +1 +# {i,j | i=-j+9; 1<=j<=5} +3 4 +0 1 1 -9 +1 0 1 -1 +1 0 -1 5 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/byu98-1-2-3.good.c b/cloog-core/test/byu98-1-2-3.good.c new file mode 100644 index 0000000..d1ad156 --- /dev/null +++ b/cloog-core/test/byu98-1-2-3.good.c @@ -0,0 +1,41 @@ +/* Generated from ../../../git/cloog/test/byu98-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test() +{ + /* Original iterators. */ + int i, j; + for (i=2;i<=3;i++) { + for (j=-i+6;j<=6;j++) { + S1(i,j) ; + } + } + for (j=3;j<=4;j++) { + S1(4,j) ; + } + S1(4,5) ; + S2(4,5) ; + S1(4,6) ; + S1(5,4) ; + S2(5,4) ; + for (j=5;j<=6;j++) { + S1(5,j) ; + } + for (i=6;i<=7;i++) { + j = -i+9 ; + S2(i,-i+9) ; + for (j=i-1;j<=6;j++) { + S1(i,j) ; + } + } + S2(8,1) ; +} diff --git a/cloog-core/test/cholesky.c b/cloog-core/test/cholesky.c new file mode 100644 index 0000000..a0d08fc --- /dev/null +++ b/cloog-core/test/cholesky.c @@ -0,0 +1,36 @@ +/* Generated from ../../../git/cloog/test/cholesky.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ +if (n >= 1) { + if (n >= 2) { + S1(1) ; + S3(1) ; + for (c3=2;c3<=n;c3++) { + S4(1,c3) ; + S6(1,c3) ; + } + } + if (n == 1) { + S1(1) ; + S3(1) ; + } + for (c1=2;c1<=n-1;c1++) { + S1(c1) ; + for (c3=1;c3<=c1-1;c3++) { + S2(c1,c3) ; + } + S3(c1) ; + for (c3=c1+1;c3<=n;c3++) { + S4(c1,c3) ; + for (c5=1;c5<=c1-1;c5++) { + S5(c1,c3,c5) ; + } + S6(c1,c3) ; + } + } + if (n >= 2) { + S1(n) ; + for (c3=1;c3<=n-1;c3++) { + S2(n,c3) ; + } + S3(n) ; + } +} diff --git a/cloog-core/test/cholesky.cloog b/cloog-core/test/cholesky.cloog new file mode 100644 index 0000000..a3eadea --- /dev/null +++ b/cloog-core/test/cholesky.cloog @@ -0,0 +1,129 @@ +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +1 +n + +6 # Number of statements + +1 +# S1 {i | 1<=i<=n} +2 4 +# i n 1 +1 1 0 -1 +1 -1 1 0 +0 0 0 + +1 +# S2 {i, j | 1<=i<=n; 1<=j<=i-1} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 0 1 0 -1 +1 1 -1 0 -1 +0 0 0 + +1 +# S3 {i | 1<=i<=n} +2 4 +# i n 1 +1 1 0 -1 +1 -1 1 0 +0 0 0 + +1 +# S4 {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 + +1 +# S5 {i, j, k | 1<=i<=n; i+1<=j<=n 1<=k<=i-1} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 1 0 -1 0 -1 +0 0 0 + +1 +# S6 {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 +0 + +6 # Scattering functions +# Et les instructions de chunking (prog init)... +6 10 +# c1 c2 c3 c4 c5 c6 i n 1 +0 1 0 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core/test/cholesky.good.c new file mode 100644 index 0000000..7619b7e --- /dev/null +++ b/cloog-core/test/cholesky.good.c @@ -0,0 +1,56 @@ +/* Generated from ../../../git/cloog/test/cholesky.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i) { hash(3); hash(i); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } +#define S6(i,j) { hash(6); hash(i); hash(j); } + +void test(int n) +{ + /* Scattering iterators. */ + int c1, c3, c5; + /* Original iterators. */ + int i, j, k; + if (n >= 2) { + S1(1) ; + S3(1) ; + for (c3=2;c3<=n;c3++) { + S4(1,c3) ; + S6(1,c3) ; + } + } + if (n == 1) { + S1(1) ; + S3(1) ; + } + for (c1=2;c1<=n-1;c1++) { + S1(c1) ; + for (c3=1;c3<=c1-1;c3++) { + S2(c1,c3) ; + } + S3(c1) ; + for (c3=c1+1;c3<=n;c3++) { + S4(c1,c3) ; + for (c5=1;c5<=c1-1;c5++) { + S5(c1,c3,c5) ; + } + S6(c1,c3) ; + } + } + if (n >= 2) { + S1(n) ; + for (c3=1;c3<=n-1;c3++) { + S2(n,c3) ; + } + S3(n) ; + } +} diff --git a/cloog-core/test/cholesky2.c b/cloog-core/test/cholesky2.c new file mode 100644 index 0000000..a093a6e --- /dev/null +++ b/cloog-core/test/cholesky2.c @@ -0,0 +1,72 @@ +/* Generated from ../../../git/cloog/test/cholesky2.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.04s. */ +if (M >= 1) { + for (c2=1;c2<=M-1;c2++) { + S1(c2); + for (c3=c2+1;c3<=M;c3++) { + S4(c2,c3); + } + } + S1(M); + if (M >= 3) { + S3(1); + } + if (M <= 2) { + S3(1); + } + if (M >= 3) { + S6(1,2); + for (c2=3;c2<=M;c2++) { + S6(1,c2); + for (i=2;i<=c2-1;i++) { + S5(i,c2,1); + } + } + } + if (M == 2) { + S6(1,2); + } + for (c1=3;c1<=3*M-7;c1++) { + if ((c1+2)%3 == 0) { + S3((c1+2)/3); + } + if (c1%3 == 0) { + S2((c1+3)/3,c1/3); + } + if ((c1+1)%3 == 0) { + S6((c1+1)/3,(c1+4)/3); + } + if (c1%3 == 0) { + S2((c1+6)/3,c1/3); + } + for (c2=ceild(c1+7,3);c2<=M;c2++) { + if ((c1+1)%3 == 0) { + S6((c1+1)/3,c2); + } + if (c1%3 == 0) { + S2(c2,c1/3); + } + if ((c1+1)%3 == 0) { + for (i=ceild(c1+4,3);i<=c2-1;i++) { + S5(i,c2,(c1+1)/3); + } + } + } + } + if (M >= 3) { + for (c2=M-1;c2<=M;c2++) { + S2(c2,M-2); + } + } + if (M >= 3) { + S3(M-1); + } + if (M >= 3) { + S6(M-1,M); + } + if (M >= 2) { + S2(M,M-1); + } + if (M >= 2) { + S3(M); + } +} diff --git a/cloog-core/test/cholesky2.cloog b/cloog-core/test/cholesky2.cloog new file mode 100644 index 0000000..6c0a81a --- /dev/null +++ b/cloog-core/test/cholesky2.cloog @@ -0,0 +1,108 @@ +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +0 + +6 # Number of statements + +1 +# S1 {i | 1<=i<=n} +2 4 +# i n 1 +1 1 0 -1 +1 -1 1 0 +0 0 0 + +1 +# S2 {i, j | 1<=i<=n; 1<=j<=i-1} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 0 1 0 -1 +1 1 -1 0 -1 +0 0 0 + +1 +# S3 {i | 1<=i<=n} +2 4 +# i n 1 +1 1 0 -1 +1 -1 1 0 +0 0 0 + +1 +# S4 {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 + +1 +# S5 {i, j, k | 1<=i<=n; i+1<=j<=n 1<=k<=i-1} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 1 0 -1 0 -1 +0 0 0 + +1 +# S6 {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 +0 + +6 # Scattering functions +# Et les instructions de chunking (parallele)... +3 7 +# c1 c2 c3 i n 1 +0 1 0 0 0 0 0 +0 0 1 0 -1 0 0 +0 0 0 1 0 0 0 + +3 8 +# c1 c2 c3 i j n 1 +0 1 0 0 0 -3 0 0 +0 0 1 0 -1 0 0 0 +0 0 0 1 0 0 0 0 + +3 7 +# c1 c2 c3 i n 1 +0 1 0 0 -3 0 2 +0 0 1 0 0 0 0 +0 0 0 1 0 0 0 + +3 8 +# c1 c2 c3 i j n 1 +0 1 0 0 0 0 0 0 +0 0 1 0 -1 0 0 0 +0 0 0 1 0 -1 0 0 + +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 0 0 -3 0 1 +0 0 1 0 0 -1 0 0 0 +0 0 0 1 0 0 -1 0 0 + +3 8 +# c1 c2 c3 i j n 1 +0 1 0 0 -3 0 0 1 +0 0 1 0 0 -1 0 0 +0 0 0 1 0 0 0 0 +0 diff --git a/cloog-core/test/cholesky2.good.c b/cloog-core/test/cholesky2.good.c new file mode 100644 index 0000000..ee4b344 --- /dev/null +++ b/cloog-core/test/cholesky2.good.c @@ -0,0 +1,114 @@ +/* Generated from ../../../git/cloog/test/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.11s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i) { hash(3); hash(i); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } +#define S6(i,j) { hash(6); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c1, c2, c3; + /* Original iterators. */ + int i, j, k; + if (M >= 2) { + for (c2=1;c2<=M-1;c2++) { + S1(c2) ; + for (c3=c2+1;c3<=M;c3++) { + S4(c2,c3) ; + } + } + S1(M) ; + } + if (M == 1) { + S1(1) ; + } + if (M >= 2) { + S3(1) ; + } + if (M >= 3) { + S6(1,2) ; + for (c2=3;c2<=M;c2++) { + S6(1,c2) ; + for (i=2;i<=c2-1;i++) { + S5(i,c2,1) ; + } + } + } + if (M == 2) { + S6(1,2) ; + } + for (c1=3;c1<=3*M-7;c1++) { + if ((c1+2)%3 == 0) { + i = (c1+2)/3 ; + S3((c1+2)/3) ; + } + if (c1%3 == 0) { + c2 = (c1+3)/3 ; + i = (c1+3)/3 ; + S2((c1+3)/3,c1/3) ; + } + c2 = floord(c1+6,3) ; + if ((c1+1)%3 == 0) { + i = (c1+1)/3 ; + S6((c1+1)/3,c2) ; + } + if (c1%3 == 0) { + S2(c2,c1/3) ; + } + for (c2=ceild(c1+7,3);c2<=M;c2++) { + if ((c1+1)%3 == 0) { + i = (c1+1)/3 ; + S6((c1+1)/3,c2) ; + } + if (c1%3 == 0) { + S2(c2,c1/3) ; + } + if ((c1+1)%3 == 0) { + c3 = (c1+1)/3 ; + for (i=ceild(c1+4,3);i<=c2-1;i++) { + k = (c1+1)/3 ; + S5(i,c2,(c1+1)/3) ; + } + } + } + } + for (c1=max(3*M-6,3);c1<=3*M-4;c1++) { + if ((c1+2)%3 == 0) { + i = (c1+2)/3 ; + S3((c1+2)/3) ; + } + if (c1%3 == 0) { + c2 = (c1+3)/3 ; + i = (c1+3)/3 ; + S2((c1+3)/3,c1/3) ; + } + for (c2=ceild(c1+4,3);c2<=M;c2++) { + if ((c1+1)%3 == 0) { + i = (c1+1)/3 ; + S6((c1+1)/3,c2) ; + } + if (c1%3 == 0) { + S2(c2,c1/3) ; + } + } + } + if (M >= 2) { + c1 = 3*M-3 ; + j = M-1 ; + S2(M,M-1) ; + } + if (M >= 1) { + c1 = 3*M-2 ; + S3(M) ; + } +} diff --git a/cloog-core/test/classen.c b/cloog-core/test/classen.c new file mode 100644 index 0000000..3b5b05e --- /dev/null +++ b/cloog-core/test/classen.c @@ -0,0 +1,101 @@ +/* Generated from /home/skimo/git/cloog/test/classen.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.45s. */ +if (m >= 1) { + if (m >= 2) { + S1(0,1,1,1); + S2(0,1,1,1,1,1,2,1); + S3(0,1,1,2,1,1,1,2); + S4(0,1,2,2,1,1,2,2); + S8(0,1); + } + if (m == 1) { + S1(0,1,1,1); + S8(0,1); + } + for (glT1=1;glT1<=2*m-4;glT1++) { + if (glT1 <= m-2) { + S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1); + S1(glT1,1,glT1+1,1); + S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1); + S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2); + S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2); + } + if (glT1 >= m) { + S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2); + S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2); + S1(glT1,glT1-m+2,m,glT1-m+2); + S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3); + } + if (glT1 == m-1) { + S5(m-2,1,m-1,1,m-1,1,m,1); + S1(m-1,1,m,1); + S3(m-1,1,m,2,m,1,m,2); + } + for (rp1=max(2,glT1-m+3);rp1<=min(glT1,m-1);rp1++) { + S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1); + S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1); + S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1); + S1(glT1,rp1,glT1-rp1+2,rp1); + S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1); + S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1); + S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1); + } + if (glT1 <= m-2) { + S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1); + S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1); + S1(glT1,glT1+1,1,glT1+1); + S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1); + S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2); + S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2); + } + if (glT1 >= m) { + S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m); + S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m); + S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m); + S1(glT1,m,glT1-m+2,m); + S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m); + } + if (glT1 == m-1) { + S6(m-2,m-1,m-1,m,1,m-1,1,m); + S7(m-2,m-1,m,m,1,m-1,2,m); + S1(m-1,m,1,m); + S2(m-1,m,m,m,1,m,2,m); + } + for (coordP1=max(1,glT1-m+2);coordP1<=min(m,glT1+1);coordP1++) { + S8(glT1,coordP1); + } + } + if (m >= 2) { + if (m >= 3) { + S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1); + S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1); + S1(2*m-3,m-1,m,m-1); + S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m); + } + if (m == 2) { + S5(0,1,1,1,1,1,2,1); + S1(1,1,2,1); + S3(1,1,2,2,2,1,2,2); + } + if (m >= 3) { + S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m); + S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m); + S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m); + S1(2*m-3,m,m-1,m); + } + if (m == 2) { + S6(0,1,1,2,1,1,1,2); + S7(0,1,2,2,1,1,2,2); + S1(1,2,1,2); + } + S2(2*m-3,m,2*m-2,m,m-1,m,m,m); + for (coordP1=m-1;coordP1<=m;coordP1++) { + S8(2*m-3,coordP1); + } + } + if (m >= 2) { + S5(2*m-3,m,2*m-2,m,m-1,m,m,m); + S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m); + S1(2*m-2,m,m,m); + S8(2*m-2,m); + } +} diff --git a/cloog-core/test/classen.cloog b/cloog-core/test/classen.cloog new file mode 100644 index 0000000..06fe3b0 --- /dev/null +++ b/cloog-core/test/classen.cloog @@ -0,0 +1,233 @@ +# created: Fri Mar 4 11:37:56 CET 2005 +# ---------------------- CONTEXT ---------------------- +c # language is C + +# Context +1 3 + 1 1 0 + + +1 # set parameter names +m + +# --------------------- STATEMENTS -------------------- +8 + +# 1 computation stmts: +1 # one domain per statement +7 7 + 1 0 0 0 0 1 -1 + 1 0 0 -1 0 1 0 + 1 0 0 1 0 0 -1 + 1 0 0 0 -1 1 0 + 1 0 0 0 1 0 -1 + 0 0 -1 0 1 0 0 + 0 -1 0 1 1 0 -2 +0 0 0 # for future options... + + +# 3 prepare-send stmts: +1 # one domain per statement +13 11 + 1 0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-1 0 1 0 0 0 0 0 -1 +0 0 0 # for future options... + + +# 3 prepare-receive stmts: +1 # one domain per statement +13 11 + 1 0 0 0 0 0 0 0 0 1 -1 + 1 -1 0 0 0 0 0 0 0 2 -3 + 1 1 0 0 0 0 0 0 0 0 0 + 1 1 -1 0 0 0 0 0 0 0 1 + 1 0 -1 0 0 0 0 0 0 1 0 + 1 -1 1 0 0 0 0 0 0 1 -3 + 1 0 1 0 0 0 0 0 0 0 -1 + 0 0 0 0 -1 0 0 0 1 0 0 + 0 0 0 -1 0 0 0 1 1 0 -2 + 0 0 -1 0 0 0 1 0 0 0 0 + 0 -1 0 0 0 1 1 0 0 0 -2 + 0 -1 0 1 0 0 0 0 0 0 -1 + 0 0 -1 0 1 0 0 0 0 0 0 +0 0 0 # for future options... + + +1 # one domain per statement +13 11 + 1 0 0 0 0 0 0 0 0 1 -1 + 1 -1 0 0 0 0 0 0 0 2 -3 + 1 1 0 0 0 0 0 0 0 0 0 + 1 1 -1 0 0 0 0 0 0 0 1 + 1 0 -1 0 0 0 0 0 0 1 -1 + 1 -1 1 0 0 0 0 0 0 1 -2 + 1 0 1 0 0 0 0 0 0 0 -1 + 0 0 0 0 -1 0 0 0 1 0 0 + 0 0 0 -1 0 0 0 1 1 0 -2 + 0 0 -1 0 0 0 1 0 0 0 0 + 0 -1 0 0 0 1 1 0 0 0 -2 + 0 -1 0 1 0 0 0 0 0 0 -1 + 0 0 -1 0 1 0 0 0 0 0 -1 +0 0 0 # for future options... + + +1 # one domain per statement +13 11 + 1 0 0 0 0 0 0 0 0 1 -1 + 1 -1 0 0 0 0 0 0 0 2 -4 + 1 1 0 0 0 0 0 0 0 0 0 + 1 1 -1 0 0 0 0 0 0 0 1 + 1 0 -1 0 0 0 0 0 0 1 -1 + 1 -1 1 0 0 0 0 0 0 1 -3 + 1 0 1 0 0 0 0 0 0 0 -1 + 0 0 0 0 -1 0 0 0 1 0 0 + 0 0 0 -1 0 0 0 1 1 0 -2 + 0 0 -1 0 0 0 1 0 0 0 0 + 0 -1 0 0 0 1 1 0 0 0 -2 + 0 -1 0 1 0 0 0 0 0 0 -2 + 0 0 -1 0 1 0 0 0 0 0 -1 +0 0 0 # for future options... + + +# communication statement: +1 # number of domains for communication statement +6 5 + 1 -1 0 2 -2 + 1 1 0 0 0 + 1 1 -1 0 1 + 1 0 -1 1 0 + 1 -1 1 1 -2 + 1 0 1 0 -1 + + +0 0 0 # for future options... + + +1 # set the iterator names +coordT1 coordP1 other1 other2 other3 other4 other5 other6 + +# --------------------- SCATTERING -------------------- +8 # Scattering functions +7 14 + 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + +7 18 + 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 + +7 18 + 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -2 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 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0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 + +7 12 + 0 1 0 0 0 0 0 0 -1 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + + +1 # we set the scattering dimension names +glT1 bl rp1 stmtType local1 local2 local3 + diff --git a/cloog-core/test/classen.good.c b/cloog-core/test/classen.good.c new file mode 100644 index 0000000..5c97c50 --- /dev/null +++ b/cloog-core/test/classen.good.c @@ -0,0 +1,396 @@ +/* Generated from ../../../git/cloog/test/classen.cloog by CLooG 0.14.0-76-gfd78716 gmp bits in 1.73s. */ +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(coordT1,coordP1,other1,other2) { hash(1); hash(coordT1); hash(coordP1); hash(other1); hash(other2); } +#define S2(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(2); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } +#define S3(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(3); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } +#define S4(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(4); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } +#define S5(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(5); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } +#define S6(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(6); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } +#define S7(coordT1,coordP1,other1,other2,other3,other4,other5,other6) { hash(7); hash(coordT1); hash(coordP1); hash(other1); hash(other2); hash(other3); hash(other4); hash(other5); hash(other6); } +#define S8(coordT1,coordP1) { hash(8); hash(coordT1); hash(coordP1); } + +void test(int m) +{ + /* Scattering iterators. */ + int glT1, rp1, local1, local2; + /* Original iterators. */ + int coordT1, coordP1, other1, other2, other3, other4, other5, other6; + if (m >= 2) { + S1(0,1,1,1) ; + S2(0,1,1,1,1,1,2,1) ; + S3(0,1,1,2,1,1,1,2) ; + S4(0,1,2,2,1,1,2,2) ; + S8(0,1) ; + } + if (m == 1) { + S1(0,1,1,1) ; + S8(0,1) ; + } + if (m >= 3) { + S5(0,1,1,1,1,1,2,1) ; + S1(1,1,2,1) ; + S2(1,1,2,1,2,1,3,1) ; + S3(1,1,2,2,2,1,2,2) ; + S4(1,1,3,2,2,1,3,2) ; + S6(0,1,1,2,1,1,1,2) ; + S7(0,1,2,2,1,1,2,2) ; + S1(1,2,1,2) ; + S2(1,2,2,2,1,2,2,2) ; + S3(1,2,2,3,1,2,1,3) ; + S4(1,2,3,3,1,2,2,3) ; + for (coordP1=1;coordP1<=2;coordP1++) { + S8(1,coordP1) ; + } + } + for (glT1=2;glT1<=m-2;glT1++) { + coordT1 = glT1-1 ; + other5 = glT1+1 ; + S5(glT1-1,1,glT1,1,glT1,1,glT1+1,1) ; + other1 = glT1+1 ; + S1(glT1,1,glT1+1,1) ; + local1 = glT1+1 ; + other1 = glT1+1 ; + other3 = glT1+1 ; + other5 = glT1+2 ; + S2(glT1,1,glT1+1,1,glT1+1,1,glT1+2,1) ; + other3 = glT1+1 ; + other5 = glT1+1 ; + S3(glT1,1,glT1+1,2,glT1+1,1,glT1+1,2) ; + other1 = glT1+2 ; + other3 = glT1+1 ; + other5 = glT1+2 ; + S4(glT1,1,glT1+2,2,glT1+1,1,glT1+2,2) ; + for (rp1=2;rp1<=glT1;rp1++) { + local1 = glT1-rp1+1 ; + coordT1 = glT1-1 ; + other3 = glT1-rp1+1 ; + other5 = glT1-rp1+2 ; + S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ; + local1 = glT1-rp1+2 ; + local2 = rp1-1 ; + coordT1 = glT1-1 ; + coordP1 = rp1-1 ; + other3 = glT1-rp1+2 ; + other4 = rp1-1 ; + other5 = glT1-rp1+2 ; + S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ; + other1 = glT1+1 ; + other3 = glT1-rp1+2 ; + other4 = rp1-1 ; + other5 = glT1-rp1+3 ; + S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ; + other1 = glT1-rp1+2 ; + S1(glT1,rp1,glT1-rp1+2,rp1) ; + local1 = glT1-rp1+2 ; + other1 = glT1+1 ; + other3 = glT1-rp1+2 ; + other5 = glT1-rp1+3 ; + S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ; + other2 = rp1+1 ; + other3 = glT1-rp1+2 ; + other5 = glT1-rp1+2 ; + other6 = rp1+1 ; + S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ; + other1 = glT1+2 ; + other2 = rp1+1 ; + other3 = glT1-rp1+2 ; + other5 = glT1-rp1+3 ; + other6 = rp1+1 ; + S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ; + } + rp1 = glT1+1 ; + coordT1 = glT1-1 ; + other2 = glT1+1 ; + other6 = glT1+1 ; + S6(glT1-1,glT1,glT1,glT1+1,1,glT1,1,glT1+1) ; + other1 = glT1+1 ; + other2 = glT1+1 ; + other6 = glT1+1 ; + S7(glT1-1,glT1,glT1+1,glT1+1,1,glT1,2,glT1+1) ; + coordP1 = glT1+1 ; + other2 = glT1+1 ; + S1(glT1,glT1+1,1,glT1+1) ; + local2 = glT1+1 ; + coordP1 = glT1+1 ; + other1 = glT1+1 ; + other2 = glT1+1 ; + other4 = glT1+1 ; + other6 = glT1+1 ; + S2(glT1,glT1+1,glT1+1,glT1+1,1,glT1+1,2,glT1+1) ; + other2 = glT1+2 ; + other4 = glT1+1 ; + other6 = glT1+2 ; + S3(glT1,glT1+1,glT1+1,glT1+2,1,glT1+1,1,glT1+2) ; + other1 = glT1+2 ; + other2 = glT1+2 ; + other4 = glT1+1 ; + other6 = glT1+2 ; + S4(glT1,glT1+1,glT1+2,glT1+2,1,glT1+1,2,glT1+2) ; + for (coordP1=1;coordP1<=glT1+1;coordP1++) { + S8(glT1,coordP1) ; + } + } + if (m >= 3) { + glT1 = m-1 ; + local1 = m-1 ; + coordT1 = m-2 ; + other1 = m-1 ; + other3 = m-1 ; + S5(m-2,1,m-1,1,m-1,1,m,1) ; + coordT1 = m-1 ; + S1(m-1,1,m,1) ; + coordT1 = m-1 ; + S3(m-1,1,m,2,m,1,m,2) ; + for (rp1=2;rp1<=m-1;rp1++) { + local1 = -rp1+m ; + coordT1 = m-2 ; + other1 = m-1 ; + other3 = -rp1+m ; + other5 = -rp1+m+1 ; + S5(m-2,rp1,m-1,rp1,-rp1+m,rp1,-rp1+m+1,rp1) ; + local1 = -rp1+m+1 ; + local2 = rp1-1 ; + coordT1 = m-2 ; + coordP1 = rp1-1 ; + other1 = m-1 ; + other3 = -rp1+m+1 ; + other4 = rp1-1 ; + other5 = -rp1+m+1 ; + S6(m-2,rp1-1,m-1,rp1,-rp1+m+1,rp1-1,-rp1+m+1,rp1) ; + other3 = -rp1+m+1 ; + other4 = rp1-1 ; + other5 = -rp1+m+2 ; + S7(m-2,rp1-1,m,rp1,-rp1+m+1,rp1-1,-rp1+m+2,rp1) ; + coordT1 = m-1 ; + other1 = -rp1+m+1 ; + S1(m-1,rp1,-rp1+m+1,rp1) ; + local1 = -rp1+m+1 ; + coordT1 = m-1 ; + other3 = -rp1+m+1 ; + other5 = -rp1+m+2 ; + S2(m-1,rp1,m,rp1,-rp1+m+1,rp1,-rp1+m+2,rp1) ; + other2 = rp1+1 ; + other3 = -rp1+m+1 ; + other5 = -rp1+m+1 ; + other6 = rp1+1 ; + S3(m-1,rp1,m,rp1+1,-rp1+m+1,rp1,-rp1+m+1,rp1+1) ; + other1 = m+1 ; + other2 = rp1+1 ; + other3 = -rp1+m+1 ; + other5 = -rp1+m+2 ; + other6 = rp1+1 ; + S4(m-1,rp1,m+1,rp1+1,-rp1+m+1,rp1,-rp1+m+2,rp1+1) ; + } + local2 = m-1 ; + coordT1 = m-2 ; + coordP1 = m-1 ; + other1 = m-1 ; + other4 = m-1 ; + S6(m-2,m-1,m-1,m,1,m-1,1,m) ; + other4 = m-1 ; + S7(m-2,m-1,m,m,1,m-1,2,m) ; + coordT1 = m-1 ; + S1(m-1,m,1,m) ; + coordT1 = m-1 ; + S2(m-1,m,m,m,1,m,2,m) ; + coordT1 = m-1 ; + for (coordP1=1;coordP1<=m;coordP1++) { + S8(m-1,coordP1) ; + } + } + for (glT1=m;glT1<=2*m-4;glT1++) { + rp1 = glT1-m+2 ; + local1 = m-1 ; + local2 = glT1-m+2 ; + coordT1 = glT1-1 ; + coordP1 = glT1-m+2 ; + other2 = glT1-m+2 ; + other3 = m-1 ; + other4 = glT1-m+2 ; + other6 = glT1-m+2 ; + S5(glT1-1,glT1-m+2,glT1,glT1-m+2,m-1,glT1-m+2,m,glT1-m+2) ; + local2 = glT1-m+1 ; + coordT1 = glT1-1 ; + coordP1 = glT1-m+1 ; + other2 = glT1-m+2 ; + other4 = glT1-m+1 ; + other6 = glT1-m+2 ; + S6(glT1-1,glT1-m+1,glT1,glT1-m+2,m,glT1-m+1,m,glT1-m+2) ; + coordP1 = glT1-m+2 ; + other2 = glT1-m+2 ; + S1(glT1,glT1-m+2,m,glT1-m+2) ; + local2 = glT1-m+2 ; + coordP1 = glT1-m+2 ; + other1 = glT1+1 ; + other2 = glT1-m+3 ; + other4 = glT1-m+2 ; + other6 = glT1-m+3 ; + S3(glT1,glT1-m+2,glT1+1,glT1-m+3,m,glT1-m+2,m,glT1-m+3) ; + for (rp1=glT1-m+3;rp1<=m-1;rp1++) { + local1 = glT1-rp1+1 ; + coordT1 = glT1-1 ; + other3 = glT1-rp1+1 ; + other5 = glT1-rp1+2 ; + S5(glT1-1,rp1,glT1,rp1,glT1-rp1+1,rp1,glT1-rp1+2,rp1) ; + local1 = glT1-rp1+2 ; + local2 = rp1-1 ; + coordT1 = glT1-1 ; + coordP1 = rp1-1 ; + other3 = glT1-rp1+2 ; + other4 = rp1-1 ; + other5 = glT1-rp1+2 ; + S6(glT1-1,rp1-1,glT1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+2,rp1) ; + other1 = glT1+1 ; + other3 = glT1-rp1+2 ; + other4 = rp1-1 ; + other5 = glT1-rp1+3 ; + S7(glT1-1,rp1-1,glT1+1,rp1,glT1-rp1+2,rp1-1,glT1-rp1+3,rp1) ; + other1 = glT1-rp1+2 ; + S1(glT1,rp1,glT1-rp1+2,rp1) ; + local1 = glT1-rp1+2 ; + other1 = glT1+1 ; + other3 = glT1-rp1+2 ; + other5 = glT1-rp1+3 ; + S2(glT1,rp1,glT1+1,rp1,glT1-rp1+2,rp1,glT1-rp1+3,rp1) ; + other2 = rp1+1 ; + other3 = glT1-rp1+2 ; + other5 = glT1-rp1+2 ; + other6 = rp1+1 ; + S3(glT1,rp1,glT1+1,rp1+1,glT1-rp1+2,rp1,glT1-rp1+2,rp1+1) ; + other1 = glT1+2 ; + other2 = rp1+1 ; + other3 = glT1-rp1+2 ; + other5 = glT1-rp1+3 ; + other6 = rp1+1 ; + S4(glT1,rp1,glT1+2,rp1+1,glT1-rp1+2,rp1,glT1-rp1+3,rp1+1) ; + } + local1 = glT1-m+1 ; + coordT1 = glT1-1 ; + other3 = glT1-m+1 ; + other5 = glT1-m+2 ; + S5(glT1-1,m,glT1,m,glT1-m+1,m,glT1-m+2,m) ; + local1 = glT1-m+2 ; + local2 = m-1 ; + coordT1 = glT1-1 ; + coordP1 = m-1 ; + other3 = glT1-m+2 ; + other4 = m-1 ; + other5 = glT1-m+2 ; + S6(glT1-1,m-1,glT1,m,glT1-m+2,m-1,glT1-m+2,m) ; + other1 = glT1+1 ; + other3 = glT1-m+2 ; + other4 = m-1 ; + other5 = glT1-m+3 ; + S7(glT1-1,m-1,glT1+1,m,glT1-m+2,m-1,glT1-m+3,m) ; + other1 = glT1-m+2 ; + S1(glT1,m,glT1-m+2,m) ; + local1 = glT1-m+2 ; + other1 = glT1+1 ; + other3 = glT1-m+2 ; + other5 = glT1-m+3 ; + S2(glT1,m,glT1+1,m,glT1-m+2,m,glT1-m+3,m) ; + for (coordP1=glT1-m+2;coordP1<=m;coordP1++) { + S8(glT1,coordP1) ; + } + } + if (m >= 3) { + glT1 = 2*m-3 ; + rp1 = m-1 ; + local1 = m-1 ; + local2 = m-1 ; + coordT1 = 2*m-4 ; + coordP1 = m-1 ; + other1 = 2*m-3 ; + other2 = m-1 ; + other3 = m-1 ; + other4 = m-1 ; + other6 = m-1 ; + S5(2*m-4,m-1,2*m-3,m-1,m-1,m-1,m,m-1) ; + local2 = m-2 ; + coordT1 = 2*m-4 ; + coordP1 = m-2 ; + other1 = 2*m-3 ; + other2 = m-1 ; + other4 = m-2 ; + other6 = m-1 ; + S6(2*m-4,m-2,2*m-3,m-1,m,m-2,m,m-1) ; + coordT1 = 2*m-3 ; + coordP1 = m-1 ; + other2 = m-1 ; + S1(2*m-3,m-1,m,m-1) ; + local2 = m-1 ; + coordT1 = 2*m-3 ; + coordP1 = m-1 ; + other1 = 2*m-2 ; + other4 = m-1 ; + S3(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ; + local1 = m-2 ; + coordT1 = 2*m-4 ; + other1 = 2*m-3 ; + other3 = m-2 ; + other5 = m-1 ; + S5(2*m-4,m,2*m-3,m,m-2,m,m-1,m) ; + local1 = m-1 ; + local2 = m-1 ; + coordT1 = 2*m-4 ; + coordP1 = m-1 ; + other1 = 2*m-3 ; + other3 = m-1 ; + other4 = m-1 ; + other5 = m-1 ; + S6(2*m-4,m-1,2*m-3,m,m-1,m-1,m-1,m) ; + other1 = 2*m-2 ; + other3 = m-1 ; + other4 = m-1 ; + S7(2*m-4,m-1,2*m-2,m,m-1,m-1,m,m) ; + coordT1 = 2*m-3 ; + other1 = m-1 ; + S1(2*m-3,m,m-1,m) ; + local1 = m-1 ; + coordT1 = 2*m-3 ; + other1 = 2*m-2 ; + other3 = m-1 ; + S2(2*m-3,m,2*m-2,m,m-1,m,m,m) ; + coordT1 = 2*m-3 ; + for (coordP1=m-1;coordP1<=m;coordP1++) { + S8(2*m-3,coordP1) ; + } + } + if (m == 2) { + S5(0,1,1,1,1,1,2,1) ; + S1(1,1,2,1) ; + S3(1,1,2,2,2,1,2,2) ; + S6(0,1,1,2,1,1,1,2) ; + S7(0,1,2,2,1,1,2,2) ; + S1(1,2,1,2) ; + S2(1,2,2,2,1,2,2,2) ; + for (coordP1=1;coordP1<=2;coordP1++) { + S8(1,coordP1) ; + } + } + if (m >= 2) { + glT1 = 2*m-2 ; + local1 = m-1 ; + coordT1 = 2*m-3 ; + other1 = 2*m-2 ; + other3 = m-1 ; + S5(2*m-3,m,2*m-2,m,m-1,m,m,m) ; + local2 = m-1 ; + coordT1 = 2*m-3 ; + coordP1 = m-1 ; + other1 = 2*m-2 ; + other4 = m-1 ; + S6(2*m-3,m-1,2*m-2,m,m,m-1,m,m) ; + coordT1 = 2*m-2 ; + S1(2*m-2,m,m,m) ; + coordT1 = 2*m-2 ; + S8(2*m-2,m) ; + } +} diff --git a/cloog-core/test/classen2.c b/cloog-core/test/classen2.c new file mode 100644 index 0000000..2afd378 --- /dev/null +++ b/cloog-core/test/classen2.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/classen2.cloog by CLooG 0.14.0-271-gaa1e292 gmp bits in 0.14s. */ +if ((M >= 2) && (N >= 3) && (outerProcTileScatter1 >= outerProcTileScatter2) && (5*outerProcTileScatter1 <= M+2*N-4) && (5*outerProcTileScatter1 <= 5*outerProcTileScatter2+N+2) && (outerProcTileScatter2 >= 0) && (5*outerProcTileScatter2 <= M+N-2) && (outerTimeTileScatter >= outerProcTileScatter1) && (outerTimeTileScatter <= 2*outerProcTileScatter1) && (outerTimeTileScatter <= outerProcTileScatter1+outerProcTileScatter2+1) && (5*outerTimeTileScatter <= 2*M+2*N-6) && (5*outerTimeTileScatter <= 5*outerProcTileScatter1+M+2) && (5*outerTimeTileScatter >= 10*outerProcTileScatter1-2*N-2) && (5*outerTimeTileScatter <= 5*outerProcTileScatter2+M+N) && (5*outerTimeTileScatter >= 10*outerProcTileScatter2-N-3) && (5*outerTimeTileScatter <= 10*outerProcTileScatter2+N+3) && (5*outerTimeTileScatter >= 5*outerProcTileScatter1+5*outerProcTileScatter2-N-4)) { + for (compScatter1=max(max(max(max(max(4,5*outerTimeTileScatter),5*outerProcTileScatter2+1),5*outerProcTileScatter1+5*outerProcTileScatter2-N),10*outerProcTileScatter1-2*N+2),10*outerProcTileScatter2-N+1);compScatter1<=min(min(min(min(min(5*outerTimeTileScatter+4,2*M+2*N-6),5*outerProcTileScatter1+M+2),5*outerProcTileScatter1+5*outerProcTileScatter2+5),5*outerProcTileScatter2+M+N),10*outerProcTileScatter2+N+3);compScatter1++) { + for (compScatter2=max(max(max(max(ceild(compScatter1+4,2),5*outerProcTileScatter1),5*outerProcTileScatter2+1),compScatter1-M+2),compScatter1-5*outerProcTileScatter2-1);compScatter2<=min(min(min(min(floord(compScatter1+2*N-2,2),compScatter1),5*outerProcTileScatter1+4),compScatter1-5*outerProcTileScatter2+N),5*outerProcTileScatter2+N+2);compScatter2++) { + for (compScatter3=max(max(5*outerProcTileScatter2,compScatter1-compScatter2+3),compScatter2-N+2);compScatter3<=min(min(compScatter2-1,5*outerProcTileScatter2+4),compScatter1-compScatter2+N);compScatter3++) { + S1(compScatter1-compScatter2+1,-compScatter1+compScatter2+compScatter3-2,compScatter2-compScatter3,compScatter1,compScatter2,compScatter3); + } + } + } +} diff --git a/cloog-core/test/classen2.cloog b/cloog-core/test/classen2.cloog new file mode 100644 index 0000000..dc12884 --- /dev/null +++ b/cloog-core/test/classen2.cloog @@ -0,0 +1,57 @@ +# created: Wed Mar 17 17:37:13 CET 2010 +# ---------------------- CONTEXT ---------------------- +c # language is C + +# Context (no parameter, so always true) +1 7 + 1 0 0 0 0 0 0 + + +1 # set parameter names +outerTimeTileScatter outerProcTileScatter1 outerProcTileScatter2 M N + +# --------------------- STATEMENTS -------------------- +1 + +1 # domains per statement +20 13 + 1 2 1 1 -1 0 0 0 0 0 0 0 0 + 1 1 1 1 0 -1 0 0 0 0 0 0 1 + 1 1 1 0 0 0 -1 0 0 0 0 0 1 + 1 -2 -1 -1 1 0 0 0 0 0 0 0 0 + 1 -1 -1 -1 0 1 0 0 0 0 0 0 -1 + 1 -1 -1 0 0 0 1 0 0 0 0 0 -1 + 1 0 0 1 0 0 0 0 0 0 0 0 -1 + 1 0 0 -1 0 0 0 0 0 0 0 1 -2 + 1 0 1 0 0 0 0 0 0 0 0 0 -1 + 1 0 -1 0 0 0 0 0 0 0 0 1 -2 + 1 1 0 0 0 0 0 0 0 0 0 0 -1 + 1 -1 0 0 0 0 0 0 0 0 1 0 -1 + 1 0 0 0 1 0 0 -5 0 0 0 0 0 + 1 0 0 0 0 1 0 0 -5 0 0 0 0 + 1 0 0 0 0 0 1 0 0 -5 0 0 0 + 1 0 0 0 0 0 -1 0 0 5 0 0 4 + 1 0 0 0 0 -1 0 0 5 0 0 0 4 + 1 0 0 0 -1 0 0 5 0 0 0 0 4 + 1 0 0 0 0 0 0 0 0 0 0 1 -3 + 1 0 0 0 0 0 0 0 0 0 1 0 -2 + + +0 0 0 # for future options... + + + +1 # set the iterator names +compIter1 compIter2 compIter3 compIter4 compIter5 compIter6 + +# --------------------- SCATTERING -------------------- +1 # Scattering functions +3 16 + 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 + + +1 # we set the scattering dimension names +compScatter1 compScatter2 compScatter3 + diff --git a/cloog-core/test/classen2.good.c b/cloog-core/test/classen2.good.c new file mode 100644 index 0000000..6aa11e4 --- /dev/null +++ b/cloog-core/test/classen2.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/classen2.cloog by CLooG 0.14.0-271-gaa1e292 gmp bits in 0.13s. */ +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(compIter1,compIter2,compIter3,compIter4,compIter5,compIter6) { hash(1); hash(compIter1); hash(compIter2); hash(compIter3); hash(compIter4); hash(compIter5); hash(compIter6); } + +void test(int outerTimeTileScatter, int outerProcTileScatter1, int outerProcTileScatter2, int M, int N) +{ + /* Scattering iterators. */ + int compScatter1, compScatter2, compScatter3; + /* Original iterators. */ + int compIter1, compIter2, compIter3, compIter4, compIter5, compIter6; + if ((M >= 2) && (N >= 3) && (outerProcTileScatter1 >= outerProcTileScatter2) && (5*outerProcTileScatter1 <= M+2*N-4) && (5*outerProcTileScatter1 <= 5*outerProcTileScatter2+N+2) && (outerProcTileScatter2 >= 0) && (5*outerProcTileScatter2 <= M+N-2) && (outerTimeTileScatter >= outerProcTileScatter1) && (outerTimeTileScatter <= 2*outerProcTileScatter1) && (outerTimeTileScatter <= outerProcTileScatter1+outerProcTileScatter2+1) && (5*outerTimeTileScatter <= 2*M+2*N-6) && (5*outerTimeTileScatter <= 5*outerProcTileScatter1+M+2) && (5*outerTimeTileScatter >= 10*outerProcTileScatter1-2*N-2) && (5*outerTimeTileScatter <= 5*outerProcTileScatter2+M+N) && (5*outerTimeTileScatter >= 10*outerProcTileScatter2-N-3) && (5*outerTimeTileScatter <= 10*outerProcTileScatter2+N+3) && (5*outerTimeTileScatter >= 5*outerProcTileScatter1+5*outerProcTileScatter2-N-4)) { + for (compScatter1=max(max(max(max(max(4,5*outerTimeTileScatter),5*outerProcTileScatter2+1),5*outerProcTileScatter1+5*outerProcTileScatter2-N),10*outerProcTileScatter1-2*N+2),10*outerProcTileScatter2-N+1);compScatter1<=min(min(min(min(min(5*outerTimeTileScatter+4,2*M+2*N-6),5*outerProcTileScatter1+M+2),5*outerProcTileScatter1+5*outerProcTileScatter2+5),5*outerProcTileScatter2+M+N),10*outerProcTileScatter2+N+3);compScatter1++) { + for (compScatter2=max(max(max(max(ceild(compScatter1+4,2),5*outerProcTileScatter1),5*outerProcTileScatter2+1),compScatter1-M+2),compScatter1-5*outerProcTileScatter2-1);compScatter2<=min(min(min(min(floord(compScatter1+2*N-2,2),compScatter1),5*outerProcTileScatter1+4),compScatter1-5*outerProcTileScatter2+N),5*outerProcTileScatter2+N+2);compScatter2++) { + for (compScatter3=max(max(5*outerProcTileScatter2,compScatter1-compScatter2+3),compScatter2-N+2);compScatter3<=min(min(compScatter2-1,5*outerProcTileScatter2+4),compScatter1-compScatter2+N);compScatter3++) { + S1(compScatter1-compScatter2+1,-compScatter1+compScatter2+compScatter3-2,compScatter2-compScatter3,compScatter1,compScatter2,compScatter3); + } + } + } + } +} diff --git a/cloog-core/test/constant.c b/cloog-core/test/constant.c new file mode 100644 index 0000000..3a6378e --- /dev/null +++ b/cloog-core/test/constant.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/constant.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.01s. */ +for (c2=0;c2<=min(1023,M+1024);c2++) { + S1(c2); + S3(c2); +} +for (c2=max(0,M+1025);c2<=1023;c2++) { + S2(c2); + S3(c2); +} +for (c1=0;c1<=min(1023,M+1024);c1++) { + S4(c1); + S6(c1); +} +for (c1=max(0,M+1025);c1<=1023;c1++) { + S5(c1); + S6(c1); +} diff --git a/cloog-core/test/constant.cloog b/cloog-core/test/constant.cloog new file mode 100644 index 0000000..d251b1b --- /dev/null +++ b/cloog-core/test/constant.cloog @@ -0,0 +1,128 @@ +# CLooG -> CLooG +# This is an automatic dump of a CLooG input file from a CloogInput data +# structure. + +# Language: C +c + +# Context: +0 3 + +0 # Parameter name(s) + +# Statement number: +6 + +# Iteration domain of statement 1 (Stmt_if.then). +1 + +3 4 1 0 0 1 +1 1 0 0 +1 -1 0 1023 +1 -1 1 1024 + +0 0 0 # For future options. + +# Iteration domain of statement 2 (Stmt_if.else). +1 + +3 4 1 0 0 1 +1 1 0 0 +1 -1 0 1023 +1 1 -1 -1025 + +0 0 0 # For future options. + +# Iteration domain of statement 3 (Stmt_if.end). +1 + +2 4 1 0 0 1 +1 1 0 0 +1 -1 0 1023 + +0 0 0 # For future options. + +# Iteration domain of statement 1 (Stmt_if.then). +1 + +3 4 1 0 0 1 +1 1 0 0 +1 -1 0 1023 +1 -1 1 1024 + +0 0 0 # For future options. + +# Iteration domain of statement 2 (Stmt_if.else). +1 + +3 4 1 0 0 1 +1 1 0 0 +1 -1 0 1023 +1 1 -1 -1025 + +0 0 0 # For future options. + +# Iteration domain of statement 3 (Stmt_if.end). +1 + +2 4 1 0 0 1 +1 1 0 0 +1 -1 0 1023 + +0 0 0 # For future options. + + +0 # Iterator name(s) + +# --------------------- SCATTERING -------------------- +6 # Scattering functions + +# Scattering of statement 1 (Stmt_if.then). +1 + +3 7 3 1 0 1 +0 0 0 1 0 0 0 +0 0 1 0 -1 0 0 +0 1 0 0 0 0 1 + +# Scattering of statement 2 (Stmt_if.else). +1 + +3 7 3 1 0 1 +0 0 0 1 0 0 -1 +0 0 1 0 -1 0 0 +0 1 0 0 0 0 1 + +# Scattering of statement 3 (Stmt_if.end). +1 + +3 7 3 1 0 1 +0 0 0 1 0 0 -2 +0 0 1 0 -1 0 0 +0 1 0 0 0 0 1 + +# Scattering of statement 1 (Stmt_if.then). +1 + +3 7 3 1 0 1 +0 0 0 1 0 0 0 +0 1 0 0 -1 0 0 +0 0 1 0 0 0 0 + +# Scattering of statement 2 (Stmt_if.else). +1 + +3 7 3 1 0 1 +0 0 0 1 0 0 -1 +0 1 0 0 -1 0 0 +0 0 1 0 0 0 0 + +# Scattering of statement 3 (Stmt_if.end). +1 + +3 7 3 1 0 1 +0 0 0 1 0 0 -2 +0 1 0 0 -1 0 0 +0 0 1 0 0 0 0 + +0 # Scattering dimension name(s) diff --git a/cloog-core/test/constant.good.c b/cloog-core/test/constant.good.c new file mode 100644 index 0000000..c94fc44 --- /dev/null +++ b/cloog-core/test/constant.good.c @@ -0,0 +1,39 @@ +/* Generated from ../../../git/cloog/test/constant.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.01s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } +#define S3(i) { hash(3); hash(i); } +#define S4(i) { hash(4); hash(i); } +#define S5(i) { hash(5); hash(i); } +#define S6(i) { hash(6); hash(i); } + +void test(int M) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i; + for (c2=0;c2<=min(1023,M+1024);c2++) { + S1(c2); + S3(c2); + } + for (c2=max(0,M+1025);c2<=1023;c2++) { + S2(c2); + S3(c2); + } + for (c1=0;c1<=min(1023,M+1024);c1++) { + S4(c1); + S6(c1); + } + for (c1=max(0,M+1025);c1<=1023;c1++) { + S5(c1); + S6(c1); + } +} diff --git a/cloog-core/test/constbound.c b/cloog-core/test/constbound.c new file mode 100644 index 0000000..c68b1c9 --- /dev/null +++ b/cloog-core/test/constbound.c @@ -0,0 +1,13 @@ +/* Generated from /home/skimo/git/cloog/test/constbound.cloog by CLooG 0.14.0-170-g72daac3 gmp bits in 0.01s. */ +for (t0=0;t0<=199;t0++) { + for (t2=50*t0;t2<=50*t0+24;t2++) { + for (t3=0;t3<=t2;t3++) { + S1(t0,t2,t3); + } + } + for (t2=50*t0+25;t2<=50*t0+49;t2++) { + for (t3=0;t3<=t2;t3++) { + S2(t0,t2,t3); + } + } +} diff --git a/cloog-core/test/constbound.cloog b/cloog-core/test/constbound.cloog new file mode 100644 index 0000000..78ac963 --- /dev/null +++ b/cloog-core/test/constbound.cloog @@ -0,0 +1,53 @@ +# CLooG script generated automatically by PLUTO +# language: C +c + +# Context +0 2 + +1 + + +# Number of statements +2 + +1 # of domains +6 5 +1 0 1 0 0 +1 0 -1 0 9999 +1 0 0 1 0 +1 0 1 -1 0 +1 -50 1 0 0 +1 50 -1 0 24 +0 0 0 + +1 +6 5 +1 0 1 0 0 +1 0 -1 0 9999 +1 0 0 1 0 +1 0 1 -1 0 +1 -50 1 0 -25 +1 50 -1 0 49 +0 0 0 + +0 + +# of scattering functions +2 + +4 9 +0 1 0 0 0 -1 0 0 0 +0 0 1 0 0 0 0 0 0 +0 0 0 1 0 0 -1 0 0 +0 0 0 0 1 0 0 -1 0 + +4 9 +0 1 0 0 0 -1 0 0 0 +0 0 1 0 0 0 0 0 -1 +0 0 0 1 0 0 -1 0 0 +0 0 0 0 1 0 0 -1 0 + +# we will set the scattering dimension names +4 +t0 t1 t2 t3 diff --git a/cloog-core/test/constbound.good.c b/cloog-core/test/constbound.good.c new file mode 100644 index 0000000..30704dd --- /dev/null +++ b/cloog-core/test/constbound.good.c @@ -0,0 +1,31 @@ +/* Generated from /home/skimo/git/cloog/test/constbound.cloog by CLooG 0.14.0-170-g72daac3 64 bits in 0.01s. */ +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); } + +void test() +{ + /* Scattering iterators. */ + int t0, t2, t3; + /* Original iterators. */ + int i, j, k; + for (t0=0;t0<=199;t0++) { + for (t2=max(0,50*t0);t2<=50*t0+24;t2++) { + for (t3=0;t3<=t2;t3++) { + S1(t0,t2,t3); + } + } + for (t2=50*t0+25;t2<=min(9999,50*t0+49);t2++) { + for (t3=0;t3<=t2;t3++) { + S2(t0,t2,t3); + } + } + } +} diff --git a/cloog-core/test/darte.c b/cloog-core/test/darte.c new file mode 100644 index 0000000..e185b7a --- /dev/null +++ b/cloog-core/test/darte.c @@ -0,0 +1,65 @@ +/* Generated from /home/skimo/git/cloog/test/darte.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.05s. */ +if (n >= 1) { + for (t3=n+3;t3<=3*n+1;t3++) { + if ((t3+n+1)%2 == 0) { + S1(1,n,(t3-n-1)/2); + } + } + for (t1=-n+2;t1<=n-1;t1++) { + if (t1 >= 2) { + for (t3=t1+4;t3<=t1+2*n+2;t3++) { + if ((t1+t3)%2 == 0) { + S1(t1+1,1,(-t1+t3-2)/2); + } + } + } + for (t2=max(-t1+2,t1+2);t2<=-t1+4;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + if ((t1+t3)%2 == 0) { + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); + } + } + } + } + for (t2=max(-t1+5,t1+3);t2<=min(-t1+2*n,t1+2*n);t2++) { + for (t3=1;t3<=min(n,t2+1);t3++) { + if ((t1+t2+1)%2 == 0) { + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); + } + } + for (t3=t2+2;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); + } + if ((t1+t2)%2 == 0) { + if ((t1+t3)%2 == 0) { + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); + } + } + } + for (t3=max(n+1,t2+2);t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + if ((t1+t3)%2 == 0) { + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2); + } + } + } + } + if (t1 <= -1) { + for (t3=1;t3<=n;t3++) { + S2(t1+n-1,n,t3); + } + } + for (t2=-t1+2*n+1;t2<=min(-t1+2*n+3,t1+2*n+1);t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3); + } + } + } + } + for (t3=1;t3<=n;t3++) { + S2(n,1,t3); + } +} diff --git a/cloog-core/test/darte.cloog b/cloog-core/test/darte.cloog new file mode 100644 index 0000000..a853691 --- /dev/null +++ b/cloog-core/test/darte.cloog @@ -0,0 +1,52 @@ +# language: C +c + +# parameters n m +1 3 +# n 1 +1 0 0 +1 +n + +2 # Number of statements + +1 +# S1 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 + +1 +# S2 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 +0 + +2 +# Scattering functions +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 -1 1 0 0 0 +0 0 1 0 -1 -1 0 0 0 +0 0 0 1 -1 -1 -2 0 0 + +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 -1 1 0 0 -1 +0 0 1 0 -1 -1 0 0 -2 +0 0 0 1 0 0 -1 0 0 +1 +t1 t2 t3 diff --git a/cloog-core/test/darte.good.c b/cloog-core/test/darte.good.c new file mode 100644 index 0000000..298c24f --- /dev/null +++ b/cloog-core/test/darte.good.c @@ -0,0 +1,449 @@ +/* Generated from ../../../git/cloog/test/darte.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */ +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); } + +void test(int n) +{ + /* Scattering iterators. */ + int t1, t2, t3; + /* Original iterators. */ + int i, j, k; + if (n >= 1) { + t1 = -n+1 ; + t2 = n+1 ; + for (t3=n+3;t3<=3*n+1;t3++) { + if ((t3+n+1)%2 == 0) { + k = (t3-n-1)/2 ; + S1(1,n,(t3-n-1)/2) ; + } + } + } + if ((n >= 2) && (n <= 2)) { + t1 = -n+2 ; + for (t2=-n+4;t2<=3*n-2;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t2+n)%2 == 0) { + i = (t2-n+2)/2 ; + j = (t2+n-2)/2 ; + if ((t3+n)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ; + } + } + } + } + t2 = n+3 ; + for (t3=1;t3<=n;t3++) { + S2(1,n,t3) ; + } + } + if (n >= 3) { + t1 = -n+2 ; + for (t2=n;t2<=n+2;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t2+n)%2 == 0) { + i = (t2-n+2)/2 ; + j = (t2+n-2)/2 ; + if ((t3+n)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t2-n+2)/2,(t2+n-2)/2,(-t2+t3)/2) ; + } + } + } + } + t2 = n+3 ; + for (t3=1;t3<=n;t3++) { + S2(1,n,t3) ; + } + } + for (t1=ceild(-2*n+5,2);t1<=min(-n+6,-1);t1++) { + for (t2=-t1+2;t2<=-t1+4;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+5;t2<=t1+2*n;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + t2 = t1+2*n+1 ; + for (t3=1;t3<=n;t3++) { + i = t1+n-1 ; + S2(t1+n-1,n,t3) ; + } + } + if (n == 2) { + for (t3=5;t3<=7;t3++) { + if ((t3+1)%2 == 0) { + k = (t3-3)/2 ; + S1(2,1,(t3-3)/2) ; + } + } + for (t2=4;t2<=6;t2++) { + for (t3=1;t3<=2;t3++) { + if (t2%2 == 0) { + i = (t2-2)/2 ; + j = (t2-2)/2 ; + S2((t2-2)/2,(t2-2)/2,t3) ; + } + } + } + } + for (t1=-n+7;t1<=-1;t1++) { + for (t2=-t1+2;t2<=-t1+4;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+5;t2<=n-2;t2++) { + for (t3=1;t3<=t2+1;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + for (t3=n+1;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=n-1;t2<=t1+2*n;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + t2 = t1+2*n+1 ; + for (t3=1;t3<=n;t3++) { + i = t1+n-1 ; + S2(t1+n-1,n,t3) ; + } + } + if (n >= 3) { + for (t1=0;t1<=min(1,-n+6);t1++) { + for (t2=t1+2;t2<=-t1+4;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+5;t2<=-t1+2*n;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + } + } + } + for (t1=max(-n+7,0);t1<=1;t1++) { + for (t2=t1+2;t2<=-t1+4;t2++) { + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+5;t2<=n-2;t2++) { + for (t3=1;t3<=t2+1;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + for (t3=n+1;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=n-1;t2<=-t1+2*n;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+2*n+1;t2<=t1+2*n+1;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + } + } + for (t1=2;t1<=n-5;t1++) { + t2 = t1+2 ; + for (t3=t1+4;t3<=t1+2*n+2;t3++) { + i = t1+1 ; + if ((t1+t3)%2 == 0) { + k = (-t1+t3-2)/2 ; + S1(t1+1,1,(-t1+t3-2)/2) ; + } + } + for (t2=t1+3;t2<=n-2;t2++) { + for (t3=1;t3<=t2+1;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + for (t3=n+1;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=n-1;t2<=-t1+2*n;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + } + } + for (t1=max(2,n-4);t1<=floord(2*n-3,2);t1++) { + t2 = t1+2 ; + for (t3=t1+4;t3<=t1+2*n+2;t3++) { + i = t1+1 ; + if ((t1+t3)%2 == 0) { + k = (-t1+t3-2)/2 ; + S1(t1+1,1,(-t1+t3-2)/2) ; + } + } + for (t2=t1+3;t2<=-t1+2*n;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + for (t3=t2+2;t3<=t2+2*n;t3++) { + if ((t1+t2)%2 == 0) { + i = (t1+t2)/2 ; + j = (-t1+t2)/2 ; + if ((t1+t3)%2 == 0) { + k = (-t2+t3)/2 ; + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) ; + } + } + } + } + for (t2=-t1+2*n+1;t2<=-t1+2*n+3;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t1+t2+1)%2 == 0) { + i = (t1+t2-3)/2 ; + j = (-t1+t2-1)/2 ; + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) ; + } + } + } + } + if (n >= 3) { + t1 = n-1 ; + t2 = n+1 ; + for (t3=n+3;t3<=3*n+1;t3++) { + if ((t3+n+1)%2 == 0) { + k = (t3-n-1)/2 ; + S1(n,1,(t3-n-1)/2) ; + } + } + for (t2=n+2;t2<=n+4;t2++) { + for (t3=1;t3<=n;t3++) { + if ((t2+n)%2 == 0) { + i = (t2+n-4)/2 ; + j = (t2-n)/2 ; + S2((t2+n-4)/2,(t2-n)/2,t3) ; + } + } + } + } + if (n >= 1) { + t2 = n+3 ; + for (t3=1;t3<=n;t3++) { + S2(n,1,t3) ; + } + } +} diff --git a/cloog-core/test/dartef.cloog b/cloog-core/test/dartef.cloog new file mode 100644 index 0000000..14454e2 --- /dev/null +++ b/cloog-core/test/dartef.cloog @@ -0,0 +1,52 @@ +# language: FORTRAN +f + +# parameters n m +1 3 +# n 1 +1 0 0 +1 +n + +2 # Number of statements + +1 +# S1 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 + +1 +# S2 {i, j, k | 1<=i<=n; 1<=j<=n, 1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 +0 + +2 +# Scattering functions +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 -1 1 0 0 0 +0 0 1 0 -1 -1 0 0 0 +0 0 0 1 -1 -1 -2 0 0 + +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 -1 1 0 0 -1 +0 0 1 0 -1 -1 0 0 -2 +0 0 0 1 0 0 -1 0 0 +1 +t1 t2 t3 diff --git a/cloog-core/test/dartef.f b/cloog-core/test/dartef.f new file mode 100644 index 0000000..50e1073 --- /dev/null +++ b/cloog-core/test/dartef.f @@ -0,0 +1,65 @@ +! Generated from /home/skimo/git/cloog/test/dartef.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.08s. +IF (n >= 1) THEN + DO t3=n+3, 3*n+1 + IF (MOD(t3+n+1, 2) == 0) THEN + S1(1,n,(t3-n-1)/2) + END IF + END DO + DO t1=-n+2, n-1 + IF (t1 >= 2) THEN + DO t3=t1+4, t1+2*n+2 + IF (MOD(t1+t3, 2) == 0) THEN + S1(t1+1,1,(-t1+t3-2)/2) + END IF + END DO + END IF + DO t2=MAX(-t1+2,t1+2), -t1+4 + DO t3=t2+2, t2+2*n + IF (MOD(t1+t2, 2) == 0) THEN + IF (MOD(t1+t3, 2) == 0) THEN + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) + END IF + END IF + END DO + END DO + DO t2=MAX(-t1+5,t1+3), MIN(-t1+2*n,t1+2*n) + DO t3=1, MIN(n,t2+1) + IF (MOD(t1+t2+1, 2) == 0) THEN + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) + END IF + END DO + DO t3=t2+2, n + IF (MOD(t1+t2+1, 2) == 0) THEN + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) + END IF + IF (MOD(t1+t2, 2) == 0) THEN + IF (MOD(t1+t3, 2) == 0) THEN + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) + END IF + END IF + END DO + DO t3=MAX(n+1,t2+2), t2+2*n + IF (MOD(t1+t2, 2) == 0) THEN + IF (MOD(t1+t3, 2) == 0) THEN + S1((t1+t2)/2,(-t1+t2)/2,(-t2+t3)/2) + END IF + END IF + END DO + END DO + IF (t1 <= -1) THEN + DO t3=1, n + S2(t1+n-1,n,t3) + END DO + END IF + DO t2=-t1+2*n+1, MIN(-t1+2*n+3,t1+2*n+1) + DO t3=1, n + IF (MOD(t1+t2+1, 2) == 0) THEN + S2((t1+t2-3)/2,(-t1+t2-1)/2,t3) + END IF + END DO + END DO + END DO + DO t3=1, n + S2(n,1,t3) + END DO +END IF diff --git a/cloog-core/test/dealII.c b/cloog-core/test/dealII.c new file mode 100644 index 0000000..200b257 --- /dev/null +++ b/cloog-core/test/dealII.c @@ -0,0 +1,14 @@ +/* Generated from ../../../git/cloog/test/dealII.cloog by CLooG 0.14.0-270-g7ee1261 gmp bits in 0.01s. */ +for (scat_0=0;scat_0<=min(T_66,T_2-1);scat_0++) { + S1(scat_0); + S2(scat_0); +} +if ((T_2 == 0) && (T_67 == 0)) { + S1(0); +} +for (scat_0=max(0,T_66+1);scat_0<=T_2-1;scat_0++) { + S1(scat_0); +} +for (scat_0=T_2;scat_0<=min(T_66,T_67-1);scat_0++) { + S2(scat_0); +} diff --git a/cloog-core/test/dealII.cloog b/cloog-core/test/dealII.cloog new file mode 100644 index 0000000..1c648f4 --- /dev/null +++ b/cloog-core/test/dealII.cloog @@ -0,0 +1,54 @@ +# CLooG -> CLooG +# This is an automatic dump of a CLooG input file from a CloogProgram data +# structure. WARNING: it is highly dangerous and MAY be correct ONLY if +# - it has been dumped before loop generation. +# - option -noscalars is used (it removes scalar dimensions otherwise) +# - option -l is at least the original scattering dimension number +# ASK THE AUTHOR IF YOU *NEED* SOMETHING MORE ROBUST +# Language: C +c + +# Context (3 parameter(s)): +4 5 +1 -1 0 0 4 +1 1 0 0 0 +1 0 -1 0 4 +1 0 1 0 0 +1 # Parameter name(s) +T_2 T_67 T_66 + +# Statement number: +2 + +# Iteration domain of statement 1. +2 + +2 6 +1 -1 1 0 0 -1 +1 1 0 0 0 0 + +2 6 +1 -1 0 -1 0 0 +1 1 0 0 0 0 +0 0 0 # For future options. + +# Iteration domain of statement 2. +2 + +3 6 +1 -1 1 0 0 -1 +1 1 0 0 0 0 +1 -1 0 0 1 0 + +3 6 +1 -1 0 1 0 -1 +1 1 0 0 0 0 +1 -1 0 0 1 0 +0 0 0 # For future options. + +1 # Iterator name(s) +scat_0 scat_1 scat_2 git_0 + +# No scattering functions. +0 + diff --git a/cloog-core/test/dealII.good.c b/cloog-core/test/dealII.good.c new file mode 100644 index 0000000..9a220ff --- /dev/null +++ b/cloog-core/test/dealII.good.c @@ -0,0 +1,30 @@ +/* Generated from ../../../git/cloog/test/dealII.cloog by CLooG 0.14.0-270-g7ee1261 gmp bits in 0.01s. */ +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(scat_0) { hash(1); hash(scat_0); } +#define S2(scat_0) { hash(2); hash(scat_0); } + +void test(int T_2, int T_67, int T_66) +{ + /* Original iterators. */ + int scat_0; + for (scat_0=0;scat_0<=min(T_66,T_2-1);scat_0++) { + S1(scat_0); + S2(scat_0); + } + if ((T_2 == 0) && (T_67 == 0)) { + S1(0); + } + for (scat_0=max(0,T_66+1);scat_0<=T_2-1;scat_0++) { + S1(scat_0); + } + for (scat_0=T_2;scat_0<=min(T_66,T_67-1);scat_0++) { + S2(scat_0); + } +} diff --git a/cloog-core/test/donotsimp.c b/cloog-core/test/donotsimp.c new file mode 100644 index 0000000..bccb8b4 --- /dev/null +++ b/cloog-core/test/donotsimp.c @@ -0,0 +1,9 @@ +/* Generated from ../../../git/cloog/test/donotsimp.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +for (c2=1;c2<=10;c2++) { + for (c4=1;c4<=c2;c4++) { + S1(c2,c4) ; + } + for (c4=11;c4<=M;c4++) { + S2(c2,c4) ; + } +} diff --git a/cloog-core/test/donotsimp.cloog b/cloog-core/test/donotsimp.cloog new file mode 100644 index 0000000..6450917 --- /dev/null +++ b/cloog-core/test/donotsimp.cloog @@ -0,0 +1,54 @@ +# Language +c + +# Context + +# {n>=20} + 1 3 + 1 1 -20 +0 + +# Number of statments +2 + +1 +# {i,j | 0<=i<=10 1<=j<=i} + + 4 5 + 1 1 0 0 -1 + 1 -1 0 0 10 + 1 0 1 0 -1 + 1 1 -1 0 0 +0 0 0 + +1 +# {i,j | 0<=i<=10 11<=j<=n} + + 4 5 + 1 1 0 0 -1 + 1 -1 0 0 10 + 1 0 1 0 -11 + 1 0 -1 1 0 +0 0 0 + +0 +# Scattering functions +2 + + 5 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + + 5 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + + +0 + diff --git a/cloog-core/test/donotsimp.good.c b/cloog-core/test/donotsimp.good.c new file mode 100644 index 0000000..8e45ab8 --- /dev/null +++ b/cloog-core/test/donotsimp.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/donotsimp.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + for (c2=1;c2<=10;c2++) { + for (c4=1;c4<=c2;c4++) { + S1(c2,c4) ; + } + for (c4=11;c4<=M;c4++) { + S2(c2,c4) ; + } + } +} diff --git a/cloog-core/test/dot.c b/cloog-core/test/dot.c new file mode 100644 index 0000000..5114ef1 --- /dev/null +++ b/cloog-core/test/dot.c @@ -0,0 +1,9 @@ +/* Generated from ../../../git/cloog/test/dot.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (j=1;j<=M;j++) { + S1(0,j) ; +} +for (i=1;i<=N;i++) { + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} diff --git a/cloog-core/test/dot.cloog b/cloog-core/test/dot.cloog new file mode 100644 index 0000000..112816e --- /dev/null +++ b/cloog-core/test/dot.cloog @@ -0,0 +1,33 @@ +# language: C +c + +# parameters {M, N | M>=1 N >=1} +2 4 +1 1 0 -1 +1 0 1 -1 +0 + +2 # Number of statements + +1 +# {i, j | i=0 0<=i<=N 1<=j<=M} +5 6 +0 1 0 0 0 0 +1 1 0 0 0 0 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 + +1 +# {i, j | i>=1 0<=i<=N 1<=j<=M} +5 6 +1 1 0 0 0 -1 +1 1 0 0 0 0 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/dot.good.c b/cloog-core/test/dot.good.c new file mode 100644 index 0000000..9cb7b96 --- /dev/null +++ b/cloog-core/test/dot.good.c @@ -0,0 +1,25 @@ +/* Generated from ../../../git/cloog/test/dot.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + for (j=1;j<=M;j++) { + S1(0,j) ; + } + for (i=1;i<=N;i++) { + for (j=1;j<=M;j++) { + S2(i,j) ; + } + } +} diff --git a/cloog-core/test/dot2.c b/cloog-core/test/dot2.c new file mode 100644 index 0000000..3b6eb5d --- /dev/null +++ b/cloog-core/test/dot2.c @@ -0,0 +1,15 @@ +/* Generated from ../../../git/cloog/test/dot2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +for (i=1;i<=min(M,N);i++) { + S1(i) ; + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} +for (i=N+1;i<=M;i++) { + S1(i) ; +} +for (i=M+1;i<=N;i++) { + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} diff --git a/cloog-core/test/dot2.cloog b/cloog-core/test/dot2.cloog new file mode 100644 index 0000000..71f471a --- /dev/null +++ b/cloog-core/test/dot2.cloog @@ -0,0 +1,29 @@ +# language: C +c + +# parameters {M, N | M>=1 N >=1} +2 4 +1 1 0 -1 +1 0 1 -1 +0 + +2 # Number of statements + +1 +# {i | 1<=i<=M} +2 5 +1 1 0 0 -1 +1 -1 1 0 0 +0 0 0 + +1 +# {i, j | 1<=i<=N 1<=j<=M} +4 6 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/dot2.good.c b/cloog-core/test/dot2.good.c new file mode 100644 index 0000000..9b7805c --- /dev/null +++ b/cloog-core/test/dot2.good.c @@ -0,0 +1,31 @@ +/* Generated from ../../../git/cloog/test/dot2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + for (i=1;i<=min(M,N);i++) { + S1(i) ; + for (j=1;j<=M;j++) { + S2(i,j) ; + } + } + for (i=N+1;i<=M;i++) { + S1(i) ; + } + for (i=M+1;i<=N;i++) { + for (j=1;j<=M;j++) { + S2(i,j) ; + } + } +} diff --git a/cloog-core/test/double.c b/cloog-core/test/double.c new file mode 100644 index 0000000..b8e5e59 --- /dev/null +++ b/cloog-core/test/double.c @@ -0,0 +1,11 @@ +/* Generated from ../../../git/cloog/test/double.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (M >= 0) { + for (i=0;i<=M;i++) { + S1(i) ; + for (j=0;j<=N;j++) { + S2(i,j) ; + S3(i,j) ; + } + S4(i) ; + } +} diff --git a/cloog-core/test/double.cloog b/cloog-core/test/double.cloog new file mode 100644 index 0000000..a9db60d --- /dev/null +++ b/cloog-core/test/double.cloog @@ -0,0 +1,69 @@ +# language: C +c + +# parameters n m +1 4 +# n m 1 +1 0 1 0 +0 + +4 # Number of statements + +1 +# S1 {i | 0<=i<=n} +2 5 +# i n m 1 +1 1 0 0 0 +1 -1 1 0 0 +0 0 0 + +1 +# S2 {i, j | 0<=i<=n; 0<=j<=m} +4 6 +# i j n m 1 +1 1 0 0 0 0 +1 -1 0 1 0 0 +1 0 1 0 0 0 +1 0 -1 0 1 0 +0 0 0 + +1 +# S3 {i, j | 0<=i<=n; 0<=j<=m} +4 6 +# i j n m 1 +1 1 0 0 0 0 +1 -1 0 1 0 0 +1 0 1 0 0 0 +1 0 -1 0 1 0 +0 0 0 + +1 +# S4 {i | 0<=i<=n} +2 5 +# i n m 1 +1 1 0 0 0 +1 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions +2 7 +# c1 C2 i n m 1 +0 1 0 -1 0 0 0 +0 0 1 0 0 0 -1 + +2 8 +# c1 C2 i j n m 1 +0 1 0 -1 0 0 0 0 +0 0 1 0 0 0 0 -2 + +2 8 +# c1 C2 i j n m 1 +0 1 0 -1 0 0 0 0 +0 0 1 0 0 0 0 -3 + +2 7 +# c1 C2 i n m 1 +0 1 0 -1 0 0 0 +0 0 1 0 0 0 -4 +0 diff --git a/cloog-core/test/double.good.c b/cloog-core/test/double.good.c new file mode 100644 index 0000000..7aa0eb3 --- /dev/null +++ b/cloog-core/test/double.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/double.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } +#define S4(i) { hash(4); hash(i); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + for (i=0;i<=M;i++) { + S1(i) ; + for (j=0;j<=N;j++) { + S2(i,j) ; + S3(i,j) ; + } + S4(i) ; + } +} diff --git a/cloog-core/test/durbin_e_s.c b/cloog-core/test/durbin_e_s.c new file mode 100644 index 0000000..d0301c8 --- /dev/null +++ b/cloog-core/test/durbin_e_s.c @@ -0,0 +1,25 @@ +/* Generated from ../../../git/cloog/test/durbin_e_s.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ +S4(1,0,0); +S7(1,0,0); +S8(1,0,3); +for (i=2;i<=9;i++) { + S2(i,-7,0); + for (j=-7;j<=i-9;j++) { + S3(i,j,1); + } + S6(i,i-9,2); + S8(i,0,3); + for (j=1;j<=i-1;j++) { + S5(i,j,3); + } +} +S2(10,-7,0); +for (j=-7;j<=1;j++) { + S3(10,j,1); +} +S6(10,1,2); +for (j=1;j<=9;j++) { + S5(10,j,3); + S1(10,j,4); +} +S1(10,10,4); diff --git a/cloog-core/test/durbin_e_s.cloog b/cloog-core/test/durbin_e_s.cloog new file mode 100644 index 0000000..55c0859 --- /dev/null +++ b/cloog-core/test/durbin_e_s.cloog @@ -0,0 +1,71 @@ +# language: C +c + +# Context +0 2 + +0 # parameter names + + +8 # Number of statements + +1 +4 5 + 0 1 0 0 -10 + 0 0 0 1 -4 + 1 0 1 0 -1 + 1 0 -1 0 10 +0 0 0 +1 +4 5 + 0 0 1 0 7 + 0 0 0 1 0 + 1 1 0 0 -2 + 1 -1 0 0 10 +0 0 0 +1 +4 5 + 0 0 0 1 -1 + 1 0 1 0 7 + 1 -1 0 0 10 + 1 1 -1 0 -9 +0 0 0 +1 +4 5 + 0 1 0 0 -1 + 0 0 1 0 0 + 0 0 0 1 0 + 1 0 0 0 1 +0 0 0 +1 +4 5 + 0 0 0 1 -3 + 1 1 -1 0 -1 + 1 -1 0 0 10 + 1 0 1 0 -1 +0 0 0 +1 +4 5 + 0 1 -1 0 -9 + 0 0 0 1 -2 + 1 0 1 0 7 + 1 0 -1 0 1 +0 0 0 +1 +4 5 + 0 1 0 0 -1 + 0 0 1 0 0 + 0 0 0 1 0 + 1 0 0 0 1 +0 0 0 +1 +4 5 + 0 0 1 0 0 + 0 0 0 1 -3 + 1 1 0 0 -1 + 1 -1 0 0 9 +0 0 0 +0 # iterator names +0 # scattering functions +0 # scattering dimension names + diff --git a/cloog-core/test/durbin_e_s.good.c b/cloog-core/test/durbin_e_s.good.c new file mode 100644 index 0000000..f96d006 --- /dev/null +++ b/cloog-core/test/durbin_e_s.good.c @@ -0,0 +1,78 @@ +/* Generated from ../../../git/cloog/test/durbin_e_s.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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); } +#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } +#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } +#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } + +void test() +{ + /* Original iterators. */ + int i, j, k; + S4(1,0,0) ; + S7(1,0,0) ; + S8(1,0,3) ; + S2(2,-7,0) ; + S3(2,-7,1) ; + S6(2,-7,2) ; + S8(2,0,3) ; + S5(2,1,3) ; + S2(3,-7,0) ; + S3(3,-7,1) ; + S3(3,-6,1) ; + S6(3,-6,2) ; + S8(3,0,3) ; + for (j=1;j<=2;j++) { + S5(3,j,3) ; + } + for (i=4;i<=8;i++) { + S2(i,-7,0) ; + S3(i,-7,1) ; + for (j=-6;j<=i-10;j++) { + S3(i,j,1) ; + } + j = i-9 ; + S3(i,i-9,1) ; + S6(i,i-9,2) ; + S8(i,0,3) ; + for (j=1;j<=i-1;j++) { + S5(i,j,3) ; + } + } + S2(9,-7,0) ; + S3(9,-7,1) ; + for (j=-6;j<=-1;j++) { + S3(9,j,1) ; + } + S3(9,0,1) ; + S6(9,0,2) ; + S8(9,0,3) ; + for (j=1;j<=8;j++) { + S5(9,j,3) ; + } + S2(10,-7,0) ; + S3(10,-7,1) ; + for (j=-6;j<=0;j++) { + S3(10,j,1) ; + } + S3(10,1,1) ; + S6(10,1,2) ; + S5(10,1,3) ; + S1(10,1,4) ; + for (j=2;j<=9;j++) { + S5(10,j,3) ; + S1(10,j,4) ; + } + S1(10,10,4) ; +} diff --git a/cloog-core/test/emploi.c b/cloog-core/test/emploi.c new file mode 100644 index 0000000..1716721 --- /dev/null +++ b/cloog-core/test/emploi.c @@ -0,0 +1,16 @@ +/* Generated from ../../../git/cloog/test/emploi.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.01s. */ +if (n >= 1) { + if (m >= 1) { + for (i=1;i<=n;i++) { + S1(i); + for (j=1;j<=m;j++) { + S2(i,j); + } + } + } + if (m <= 0) { + for (i=1;i<=n;i++) { + S1(i); + } + } +} diff --git a/cloog-core/test/emploi.cloog b/cloog-core/test/emploi.cloog new file mode 100644 index 0000000..0dd7a26 --- /dev/null +++ b/cloog-core/test/emploi.cloog @@ -0,0 +1,49 @@ +# language: C +c + +# The context (no constraints on parameters) +1 4 # 1 lines and 4 columns +# m n 1 +1 0 0 0 # 0 >= 0, always true +1 # We want to set the parameter names +m n + +2 # The number of statements + +2 # First statement +# The first domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 -1 2 0 0 # i <= 2*m +# The second domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 1 -1 0 0 # i >= m +0 0 0 + +1 # Second statement +4 6 # 4 lines and 6 columns +# i j m n 1 +1 1 0 0 0 -1 # i >= 1 +1 -1 0 0 1 0 # i <= n +1 0 1 0 0 -1 # j >= 1 +1 0 -1 1 0 0 # j <= m +0 0 0 +0 + +0 # Scattering functions +# The first function +2 7 # 2 lines and 7 columns +# c1 c2 i m n 1 +0 1 0 -1 0 0 0 # c1 = i +0 0 1 0 0 0 0 # c2 = 0 +# The second function +2 8 # 2 lines and 8 columns +# c1 c2 i j m n 1 +0 1 0 0 0 0 -1 0 # c1 = n +0 0 1 -1 -1 0 0 0 # c2 = i+j +0 diff --git a/cloog-core/test/emploi.good.c b/cloog-core/test/emploi.good.c new file mode 100644 index 0000000..ad812d8 --- /dev/null +++ b/cloog-core/test/emploi.good.c @@ -0,0 +1,35 @@ +/* Generated from ../../../git/cloog/test/emploi.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int m, int n) +{ + /* Original iterators. */ + int i, j; + if (m >= 1) { + for (i=1;i<=n;i++) { + if (i >= m) { + S1(i) ; + } + if (i <= min(2*m,m-1)) { + S1(i) ; + } + for (j=1;j<=m;j++) { + S2(i,j) ; + } + } + } + if (m <= 0) { + for (i=1;i<=n;i++) { + S1(i) ; + } + } +} diff --git a/cloog-core/test/equality.c b/cloog-core/test/equality.c new file mode 100644 index 0000000..86b024d --- /dev/null +++ b/cloog-core/test/equality.c @@ -0,0 +1,11 @@ +/* Generated from ../../../git/cloog/test/equality.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +for (i0=0;i0<=5;i0++) { + for (i1=ceild(4*i0,5);i1<=floord(6*i0+20,5);i1++) { + if (2*i0 == i1) { + S1(i0,i1) ; + } + if (i1 == 4) { + S2(i0,i1) ; + } + } +} diff --git a/cloog-core/test/equality.cloog b/cloog-core/test/equality.cloog new file mode 100644 index 0000000..da83671 --- /dev/null +++ b/cloog-core/test/equality.cloog @@ -0,0 +1,33 @@ +# Language: C +c + +# Context (0 parameter(s)): +1 2 + 1 1 +1 # Parameter name(s) + + +# Statement number: +2 + +# Iteration domain of statement 1. +1 +3 4 +0 2 -1 0 +1 1 0 0 +1 -1 0 5 +0 0 0 # For future options. + +# Iteration domain of statement 2. +1 +3 4 +0 0 -1 4 +1 1 0 0 +1 -1 0 5 +0 0 0 # For future options. + +1 # Iterator name(s) +i0 i1 + +# No scattering functions. +0 diff --git a/cloog-core/test/equality.good.c b/cloog-core/test/equality.good.c new file mode 100644 index 0000000..371f48b --- /dev/null +++ b/cloog-core/test/equality.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/equality.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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(i0,i1) { hash(1); hash(i0); hash(i1); } +#define S2(i0,i1) { hash(2); hash(i0); hash(i1); } + +void test() +{ + /* Original iterators. */ + int i0, i1; + for (i0=0;i0<=5;i0++) { + for (i1=ceild(4*i0,5);i1<=floord(6*i0+20,5);i1++) { + if (2*i0 == i1) { + S1(i0,i1) ; + } + if (i1 == 4) { + S2(i0,i1) ; + } + } + } +} diff --git a/cloog-core/test/equality2.c b/cloog-core/test/equality2.c new file mode 100644 index 0000000..ea28ab2 --- /dev/null +++ b/cloog-core/test/equality2.c @@ -0,0 +1,15 @@ +/* Generated from ../../../git/cloog/test/equality2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.07s. */ +for (i0=1;i0<=10000;i0++) { + for (i1=1000;i1<=1016;i1++) { + for (i2=1;i2<=min(-2*i1+2033,2*i1-1999);i2++) { + if (2*i1 == i2+1999) { + S2(i0,i1,i2,1,i0,2*i1-1000,1,2,i0,i1-499,2*i1-1999,i0,2*i1-1999,i1-999,i1-999) ; + } + if (i2 == 1) { + if (i1%2 == 0) { + S1(i0,i1,i2,2,i0,(i1+2)/2,i1-999,i0,i1-999,(i1-998)/2,(i1-998)/2) ; + } + } + } + } +} diff --git a/cloog-core/test/equality2.cloog b/cloog-core/test/equality2.cloog new file mode 100644 index 0000000..c62469c --- /dev/null +++ b/cloog-core/test/equality2.cloog @@ -0,0 +1,57 @@ +c + +# Context (0 parameter(s)): +1 2 + 1 1 +1 # Parameter name(s) + + +# Statement number: +2 + +# Iteration domain of statement 2. +1 +13 13 + 0 1 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 -2 -998 + 0 0 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 0 0 0 -2 + 0 0 0 0 0 1 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 -1 -500 + 0 0 0 0 0 0 0 1 0 0 0 -2 1 + 0 0 0 0 0 0 0 0 0 1 0 -2 1 + 0 0 0 0 0 0 0 0 0 0 1 -1 0 + 1 0 0 0 0 0 0 0 1 0 0 0 -1 + 1 0 0 0 0 0 0 0 -1 0 0 0 10000 + 1 0 0 0 0 0 0 0 0 0 0 1 -1 + 1 0 0 0 0 0 0 0 0 0 0 -1 9 +0 0 0 # For future options. + +# Iteration domain of statement 3. +1 +17 17 + 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 -1 -999 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -2 1 + 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -998 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -2 + 0 0 0 0 0 0 0 0 0 1 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 -500 + 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -2 1 + 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 -2 1 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 + 1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 10000 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 9 +0 0 0 # For future options. + + +1 # Iterator name(s) +i0 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 + +# No scattering functions. +0 diff --git a/cloog-core/test/equality2.good.c b/cloog-core/test/equality2.good.c new file mode 100644 index 0000000..74bf88b --- /dev/null +++ b/cloog-core/test/equality2.good.c @@ -0,0 +1,31 @@ +/* Generated from ../../../git/cloog/test/equality2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10) { hash(1); hash(i0); hash(i1); hash(i2); hash(i3); hash(i4); hash(i5); hash(i6); hash(i7); hash(i8); hash(i9); hash(i10); } +#define S2(i0,i1,i2,i3,i4,i5,i6,i7,i8,i9,i10,i11,i12,i13,i14) { hash(2); hash(i0); hash(i1); hash(i2); hash(i3); hash(i4); hash(i5); hash(i6); hash(i7); hash(i8); hash(i9); hash(i10); hash(i11); hash(i12); hash(i13); hash(i14); } + +void test() +{ + /* Original iterators. */ + int i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14; + for (i0=1;i0<=10000;i0++) { + for (i1=1000;i1<=1016;i1++) { + for (i2=1;i2<=min(-2*i1+2033,2*i1-1999);i2++) { + if (2*i1 == i2+1999) { + S2(i0,i1,i2,1,i0,2*i1-1000,1,2,i0,i1-499,2*i1-1999,i0,2*i1-1999,i1-999,i1-999) ; + } + if (i2 == 1) { + if (i1%2 == 0) { + S1(i0,i1,i2,2,i0,(i1+2)/2,i1-999,i0,i1-999,(i1-998)/2,(i1-998)/2) ; + } + } + } + } + } +} diff --git a/cloog-core/test/esced.c b/cloog-core/test/esced.c new file mode 100644 index 0000000..d26d395 --- /dev/null +++ b/cloog-core/test/esced.c @@ -0,0 +1,16 @@ +/* Generated from ../../../git/cloog/test/esced.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (m >= 1) { + if (n >= 1) { + for (i=1;i<=m;i++) { + S1(i) ; + for (j=1;j<=n;j++) { + S2(i,j) ; + } + } + } + if (n <= 0) { + for (i=1;i<=m;i++) { + S1(i) ; + } + } +} diff --git a/cloog-core/test/esced.cloog b/cloog-core/test/esced.cloog new file mode 100644 index 0000000..9caba01 --- /dev/null +++ b/cloog-core/test/esced.cloog @@ -0,0 +1,30 @@ +# language: C +c + +# parameters {n, m | n<=m} +1 4 +#1 1 -1 0 +1 0 0 1 +1 +n m + +2 # Number of statements + +1 +# {i | 1<=i<=n} +2 5 +1 1 0 0 -1 +1 -1 0 1 0 +0 0 0 + +1 +# {i, j | 1<=i<=n 1<=j<=m} +4 6 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/esced.good.c b/cloog-core/test/esced.good.c new file mode 100644 index 0000000..cab5f34 --- /dev/null +++ b/cloog-core/test/esced.good.c @@ -0,0 +1,30 @@ +/* Generated from ../../../git/cloog/test/esced.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int n, int m) +{ + /* Original iterators. */ + int i, j; + if (n >= 1) { + for (i=1;i<=m;i++) { + S1(i) ; + for (j=1;j<=n;j++) { + S2(i,j) ; + } + } + } + if (n <= 0) { + for (i=1;i<=m;i++) { + S1(i) ; + } + } +} diff --git a/cloog-core/test/ex1.c b/cloog-core/test/ex1.c new file mode 100644 index 0000000..b5584c0 --- /dev/null +++ b/cloog-core/test/ex1.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/ex1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +for (i=0;i<=14;i++) { + for (j=0;j<=n-15;j++) { + S1(i,j) ; + } +} +for (i=15;i<=n;i++) { + for (j=0;j<=9;j++) { + S1(i,j) ; + } + for (j=10;j<=n-15;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=n-14;j<=n;j++) { + S2(i,j) ; + } +} diff --git a/cloog-core/test/ex1.cloog b/cloog-core/test/ex1.cloog new file mode 100644 index 0000000..6a85398 --- /dev/null +++ b/cloog-core/test/ex1.cloog @@ -0,0 +1,34 @@ +# language: C +c + +# parameters {n} +1 3 +# n 1 +1 1 -25 +1 +n + +2 # Number of statements + +1 +# {i | 0<=i<=n, 0<=j<=n-15} +4 5 +# i j n 1 +1 1 0 0 0 +1 -1 0 1 0 +1 0 1 0 0 +1 0 -1 1 -15 +0 0 0 + +1 +# {i | 15<=i<=n, 10<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -15 +1 -1 0 1 0 +1 0 1 0 -10 +1 0 -1 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/ex1.good.c b/cloog-core/test/ex1.good.c new file mode 100644 index 0000000..b73fd94 --- /dev/null +++ b/cloog-core/test/ex1.good.c @@ -0,0 +1,34 @@ +/* Generated from ../../../git/cloog/test/ex1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int n) +{ + /* Original iterators. */ + int i, j; + for (i=0;i<=14;i++) { + for (j=0;j<=n-15;j++) { + S1(i,j) ; + } + } + for (i=15;i<=n;i++) { + for (j=0;j<=9;j++) { + S1(i,j) ; + } + for (j=10;j<=n-15;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=n-14;j<=n;j++) { + S2(i,j) ; + } + } +} diff --git a/cloog-core/test/forwardsub-1-1-2.c b/cloog-core/test/forwardsub-1-1-2.c new file mode 100644 index 0000000..58ce5c8 --- /dev/null +++ b/cloog-core/test/forwardsub-1-1-2.c @@ -0,0 +1,11 @@ +/* Generated from ../../../git/cloog/test/forwardsub-1-1-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +S3(1,1) ; +S1(2,1) ; +S4(2,2) ; +for (i=3;i<=M;i++) { + S1(i,1) ; + for (j=2;j<=i-1;j++) { + S2(i,j) ; + } + S4(i,i) ; +} diff --git a/cloog-core/test/forwardsub-1-1-2.cloog b/cloog-core/test/forwardsub-1-1-2.cloog new file mode 100644 index 0000000..38986f9 --- /dev/null +++ b/cloog-core/test/forwardsub-1-1-2.cloog @@ -0,0 +1,56 @@ +# language: C +c + +# Context +#{N | 3<=N} +2 3 +# M 1 +1 1 -3 +1 0 1 +0 + +4 # Number of statements + +1 +#{t1,t2 | 2<=t1<=N; t2=1; 3<=N} +5 5 +# i j M 1 +0 0 1 0 -1 +1 0 0 1 -3 +1 -1 0 1 0 +1 1 0 0 -2 +1 0 0 0 1 +0 0 0 + +1 +#{t1,t2 | t2+1<=t1<=N; 2<=t2} +4 5 +# i j M 1 +1 1 -1 0 -1 +1 0 1 0 -2 +1 -1 0 1 0 +1 0 0 0 1 +0 0 0 + +1 +#{t1,t2 | t1=1; t2=1; 3<=N} +4 5 +# i j M 1 +0 1 0 0 -1 +0 0 1 0 -1 +1 0 0 1 -3 +1 0 0 0 1 +0 0 0 + +1 +#{t1,t2 | t1=t2; 2<=t2<=N; 3<=N} +4 5 +# i j M 1 +0 1 -1 0 0 +1 0 0 1 -3 +1 0 -1 1 0 +1 0 1 0 -2 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/forwardsub-1-1-2.good.c b/cloog-core/test/forwardsub-1-1-2.good.c new file mode 100644 index 0000000..cebe239 --- /dev/null +++ b/cloog-core/test/forwardsub-1-1-2.good.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/forwardsub-1-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } +#define S4(i,j) { hash(4); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + S3(1,1) ; + S1(2,1) ; + S4(2,2) ; + for (i=3;i<=M;i++) { + S1(i,1) ; + for (j=2;j<=i-1;j++) { + S2(i,j) ; + } + S4(i,i) ; + } +} diff --git a/cloog-core/test/forwardsub-2-1-2-3.c b/cloog-core/test/forwardsub-2-1-2-3.c new file mode 100644 index 0000000..7c4bc22 --- /dev/null +++ b/cloog-core/test/forwardsub-2-1-2-3.c @@ -0,0 +1,12 @@ +/* Generated from ../../../git/cloog/test/forwardsub-2-1-2-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +S3(1,0) ; +for (k=2;k<=M;k++) { + S1(1,1,k) ; +} +for (i=2;i<=M-1;i++) { + S4(i,0) ; + for (k=i+1;k<=M;k++) { + S2(i,1,k) ; + } +} +S4(M,0) ; diff --git a/cloog-core/test/forwardsub-2-1-2-3.cloog b/cloog-core/test/forwardsub-2-1-2-3.cloog new file mode 100644 index 0000000..33d29f3 --- /dev/null +++ b/cloog-core/test/forwardsub-2-1-2-3.cloog @@ -0,0 +1,58 @@ +# language: C +c + +# Context +#{M | 3<=M} +2 3 +# M 1 +1 1 -3 +1 0 1 +0 + +4 # Number of statements + +1 +#{i,j,k | i=1; j=1; 2<=k<=M; 3<=M} +6 6 +# i j k M 1 +0 1 0 0 0 -1 +0 0 1 0 0 -1 +1 0 0 0 1 -3 +1 0 0 -1 1 0 +1 0 0 1 0 -2 +1 0 0 0 0 1 +0 0 0 + +1 +#{i,j,k | 2<=i<=k-1; j=1; k<=M} +5 6 +# i j k M 1 +0 0 1 0 0 -1 +1 -1 0 1 0 -1 +1 1 0 0 0 -2 +1 0 0 -1 1 0 +1 0 0 0 0 1 +0 0 0 + +1 +#{i,j | i=1; j=0; 3<=M} +4 5 +# i j M 1 +0 1 0 0 -1 +0 0 1 0 0 +1 0 0 1 -3 +1 0 0 0 1 +0 0 0 + +1 +#{i,j | 2<=i<=M; j=0; 3<=M} +4 5 +# i j M 1 +0 0 1 0 0 +1 1 0 0 -2 +1 0 0 1 -3 +1 -1 0 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/forwardsub-2-1-2-3.good.c b/cloog-core/test/forwardsub-2-1-2-3.good.c new file mode 100644 index 0000000..69ff99c --- /dev/null +++ b/cloog-core/test/forwardsub-2-1-2-3.good.c @@ -0,0 +1,30 @@ +/* Generated from ../../../git/cloog/test/forwardsub-2-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(3); hash(i); hash(j); } +#define S4(i,j) { hash(4); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j, k; + S3(1,0) ; + for (k=2;k<=M;k++) { + S1(1,1,k) ; + } + for (i=2;i<=M-1;i++) { + S4(i,0) ; + for (k=i+1;k<=M;k++) { + S2(i,1,k) ; + } + } + S4(M,0) ; +} diff --git a/cloog-core/test/forwardsub-3-1-2.c b/cloog-core/test/forwardsub-3-1-2.c new file mode 100644 index 0000000..0f398ed --- /dev/null +++ b/cloog-core/test/forwardsub-3-1-2.c @@ -0,0 +1,23 @@ +/* Generated from ../../../git/cloog/test/forwardsub-3-1-2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +S3(2,1) ; +S1(3,1) ; +S1(4,1) ; +S4(4,2) ; +for (i=5;i<=M+1;i++) { + S1(i,1) ; + for (j=2;j<=floord(i-1,2);j++) { + S2(i,j) ; + } + if (i%2 == 0) { + S4(i,i/2) ; + } +} +for (i=M+2;i<=2*M-1;i++) { + for (j=i-M;j<=floord(i-1,2);j++) { + S2(i,j) ; + } + if (i%2 == 0) { + S4(i,i/2) ; + } +} +S4(2*M,M) ; diff --git a/cloog-core/test/forwardsub-3-1-2.cloog b/cloog-core/test/forwardsub-3-1-2.cloog new file mode 100644 index 0000000..6e41e75 --- /dev/null +++ b/cloog-core/test/forwardsub-3-1-2.cloog @@ -0,0 +1,57 @@ +# language: C +c + +# Context +#{N | 3<=N} +2 3 +# M 1 +1 1 -3 +1 0 1 +0 + +4 # Number of statements + +1 +#{t1,i | 3<=t1<=N+1; i=1; 3<=N} +5 5 +# i j M 1 +0 0 1 0 -1 +1 0 0 1 -3 +1 -1 0 1 1 +1 1 0 0 -3 +1 0 0 0 1 +0 0 0 + +1 +#{t1,i | 2i+1<=t1<=i+N; 2<=i} +4 5 +# i j M 1 +1 1 -2 0 -1 +1 0 1 0 -2 +1 -1 1 1 0 +1 0 0 0 1 +0 0 0 + +1 +#{t1,i | t1=2; i=1; 3<=N} +4 5 +# i j M 1 +0 1 0 0 -2 +0 0 1 0 -1 +1 0 0 1 -3 +1 0 0 0 1 +0 0 0 + +1 +#{t1,i | t1=2i; 2<=i<=N; 3<=N} +5 5 +# i j M 1 +0 1 -2 0 0 +1 0 0 1 -3 +1 0 -1 1 0 +1 0 1 0 -2 +1 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/forwardsub-3-1-2.good.c b/cloog-core/test/forwardsub-3-1-2.good.c new file mode 100644 index 0000000..2969ae8 --- /dev/null +++ b/cloog-core/test/forwardsub-3-1-2.good.c @@ -0,0 +1,42 @@ +/* Generated from ../../../git/cloog/test/forwardsub-3-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } +#define S4(i,j) { hash(4); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + S3(2,1) ; + S1(3,1) ; + S1(4,1) ; + S4(4,2) ; + for (i=5;i<=M+1;i++) { + S1(i,1) ; + for (j=2;j<=floord(i-1,2);j++) { + S2(i,j) ; + } + if (i%2 == 0) { + S4(i,i/2) ; + } + } + for (i=M+2;i<=2*M-1;i++) { + for (j=i-M;j<=floord(i-1,2);j++) { + S2(i,j) ; + } + if (i%2 == 0) { + S4(i,i/2) ; + } + } + i = 2*M ; + S4(2*M,M) ; +} diff --git a/cloog-core/test/gauss.c b/cloog-core/test/gauss.c new file mode 100644 index 0000000..341c2aa --- /dev/null +++ b/cloog-core/test/gauss.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/gauss.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ +if (M >= 2) { + for (c2=2;c2<=M;c2++) { + for (j=2;j<=M;j++) { + S2(1,j,c2) ; + } + } + for (c1=2;c1<=M-1;c1++) { + for (c2=c1+1;c2<=M;c2++) { + for (j=1;j<=c1-1;j++) { + S1(c1,j,c2) ; + } + for (j=c1+1;j<=M;j++) { + S2(c1,j,c2) ; + } + } + } +} diff --git a/cloog-core/test/gauss.cloog b/cloog-core/test/gauss.cloog new file mode 100644 index 0000000..0a84b01 --- /dev/null +++ b/cloog-core/test/gauss.cloog @@ -0,0 +1,72 @@ +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +0 + +2 # Number of statements + +1 +# {i, j, k | 1<=i<=n; 1<=j<=i-1 i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 1 -1 0 0 -1 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 + +1 +# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 +0 + +2 # Scattering functions +# Et les instructions de chunking... +2 8 +# c1 c2 i j k n 1 +0 1 0 -1 0 0 0 0 +0 0 1 0 0 -1 0 0 + +2 8 +# c1 c2 i j k n 1 +0 1 0 -1 0 0 0 0 +0 0 1 0 0 -1 0 0 +0 + +2 +# Et les instructions de chunking... +1 7 +# c1 i j k n 1 +0 1 0 0 0 -1 2 + +1 7 +# c1 i j k n 1 +0 1 -1 0 0 0 1 +0 + +2 +# Et les instructions de chunking... +2 8 +# c1 c2 i j k n 1 +0 1 0 -1 0 0 0 0 +0 0 1 0 0 -1 0 0 + +2 8 +# c1 c2 i j k n 1 +0 1 0 -1 0 0 0 0 +0 0 1 0 0 -1 0 0 +0 diff --git a/cloog-core/test/gauss.good.c b/cloog-core/test/gauss.good.c new file mode 100644 index 0000000..fb1939d --- /dev/null +++ b/cloog-core/test/gauss.good.c @@ -0,0 +1,36 @@ +/* Generated from ../../../git/cloog/test/gauss.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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); } + +void test(int M) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j, k; + if (M >= 2) { + for (c2=2;c2<=M;c2++) { + for (j=2;j<=M;j++) { + S2(1,j,c2) ; + } + } + } + for (c1=2;c1<=M-1;c1++) { + for (c2=c1+1;c2<=M;c2++) { + for (j=1;j<=c1-1;j++) { + S1(c1,j,c2) ; + } + for (j=c1+1;j<=M;j++) { + S2(c1,j,c2) ; + } + } + } +} diff --git a/cloog-core/test/generate_test.c b/cloog-core/test/generate_test.c new file mode 100644 index 0000000..b4ef043 --- /dev/null +++ b/cloog-core/test/generate_test.c @@ -0,0 +1,141 @@ +#include <stdio.h> +#include <cloog/cloog.h> + +/* Generate code that scans part of the parameter domain of + * a given cloog problem, running both a function called "good" + * and a function called "test" for each value of the parameters. + * These functions are assumed to call the "hash" function, + * which is also generated by this program. + * If for any given value of the parameters, the final hash + * value computed by test is different from that computed by + * good, then an error is reported. + */ + +CloogDomain *get_param_domain(CloogOptions *options) +{ + CloogDomain *domain; + CloogProgram *program; + + program = cloog_program_read(stdin, options); + + domain = cloog_domain_copy(program->context); + + cloog_program_free(program); + + return cloog_domain_from_context(domain); +} + +static const char preamble[] = +"#include <assert.h>\n" +"#include <stdio.h>\n" +"\n" +"static unsigned h;\n" +"\n" +"void hash(int v)\n" +"{\n" +" int i;\n" +" union u {\n" +" int v;\n" +" unsigned char c[1];\n" +" } u;\n" +" u.v = v;\n" +" for (i = 0; i < sizeof(int); ++i) {\n" +" h *= 16777619;\n" +" h ^= u.c[i];\n" +" }\n" +"}\n" +"\n" +"int main()\n" +"{\n" +" unsigned h_good, h_test;\n"; +; + +static const char postamble[] = +" return 0;\n" +"}\n" +; + +static const char *call[] = {"good", "test"}; + +int main() +{ + int dim; + int range; + int i, j; + CloogState *state = cloog_state_malloc(); + CloogOptions *options = cloog_options_malloc(state); + CloogDomain *domain; + CloogDomain *cube, *tmp; + CloogProgram *p; + CloogStatement *statement; + cloog_int_t m, M; + + options->quiet = 1; + domain = get_param_domain(options); + dim = cloog_domain_dimension(domain); + + if (dim >= 8) + range = 4; + else if (dim >= 5) + range = 6; + else + range = 30; + + cloog_int_init(m); + cloog_int_init(M); + cloog_int_set_si(m, 0); + cloog_int_set_si(M, range); + cube = cloog_domain_cube(state, dim, m, M); + domain = cloog_domain_intersection(tmp = domain, cube); + cloog_domain_free(tmp); + cloog_domain_free(cube); + + p = cloog_program_malloc(); + assert(p); + p->names = cloog_names_malloc(); + assert(p->names); + p->names->nb_iterators = dim; + p->names->iterators = cloog_names_generate_items(dim, "p", 0); + p->language = 'c'; + p->context = cloog_domain_universe(state, 0); + statement = cloog_statement_alloc(state, 1); + p->loop = cloog_loop_malloc(state); + p->loop->domain = domain; + p->loop->block = cloog_block_alloc(statement, 0, NULL, dim); + p->blocklist = cloog_block_list_alloc(p->loop->block); + p = cloog_program_generate(p, options); + + printf("%s", preamble); + for (i = 0; i < dim; ++i) + printf("\tint %s;\n", p->names->iterators[i]); + printf("#define S1("); + for (i = 0; i < dim; ++i) { + if (i) + printf(","); + printf("p%d", i); + } + printf(") do {"); + for (j = 0; j < 2; ++j) { + printf(" h = 2166136261u;"); + printf(" %s(", call[j]); + for (i = 0; i < dim; ++i) { + if (i) + printf(", "); + printf("p%d", i); + } + printf(");"); + printf(" h_%s = h;", call[j]); + } + printf(" assert(h_good == h_test);"); + printf(" } while (0)\n"); + cloog_program_pprint(stdout, p, options); + printf("%s", postamble); + + cloog_int_clear(m); + cloog_int_clear(M); + cloog_program_free(p); + cloog_options_free(options); + cloog_state_free(state); + + return 0; +} diff --git a/cloog-core/test/gesced.c b/cloog-core/test/gesced.c new file mode 100644 index 0000000..6b69507 --- /dev/null +++ b/cloog-core/test/gesced.c @@ -0,0 +1,20 @@ +/* Generated from ../../../git/cloog/test/gesced.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.05s. */ +for (c1=1;c1<=N;c1++) { + S1(c1) ; +} +for (c1=N+1;c1<=2*N;c1++) { + for (i=1;i<=N;i++) { + S2(i,c1-N) ; + } +} +for (c1=2*N+1;c1<=M+N;c1++) { + for (i=1;i<=N;i++) { + S3(i,c1-2*N) ; + S2(i,c1-N) ; + } +} +for (c1=M+N+1;c1<=M+2*N;c1++) { + for (i=1;i<=N;i++) { + S3(i,c1-2*N) ; + } +} diff --git a/cloog-core/test/gesced.cloog b/cloog-core/test/gesced.cloog new file mode 100644 index 0000000..5f37046 --- /dev/null +++ b/cloog-core/test/gesced.cloog @@ -0,0 +1,56 @@ +# language: C +c + +# parameters {n, m | n<=m n>=2 m>=2} +3 4 +# m n 1 +1 1 -1 0 +1 1 0 -2 +1 0 1 -2 +0 + +3 # Number of statements + +1 +# {i | 1<=i<=n} +2 5 +# i m n 1 +1 1 0 0 -1 +1 -1 0 1 0 +0 0 0 + +1 +# {i, j | 1<=i<=n 1<=j<=m} +4 6 +# i j m n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 + +1 +# {i, j | 1<=i<=n 1<=j<=m} +4 6 +# i j m n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +3 # Scattering functions +# Et les instructions de chunking (prog init)... +1 6 +# c1 i m n 1 +0 1 -1 0 0 0 + +1 7 +# c1 i j m n 1 +0 1 0 -1 0 -1 0 + +1 7 +# c1 i j m n 1 +0 1 0 -1 0 -2 0 +0 diff --git a/cloog-core/test/gesced.good.c b/cloog-core/test/gesced.good.c new file mode 100644 index 0000000..bae55dd --- /dev/null +++ b/cloog-core/test/gesced.good.c @@ -0,0 +1,43 @@ +/* Generated from ../../../git/cloog/test/gesced.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i, j; + for (c1=1;c1<=N;c1++) { + S1(c1) ; + } + for (c1=N+1;c1<=2*N;c1++) { + for (i=1;i<=N;i++) { + j = c1-N ; + S2(i,c1-N) ; + } + } + for (c1=2*N+1;c1<=M+N;c1++) { + for (i=1;i<=N;i++) { + j = c1-2*N ; + S3(i,c1-2*N) ; + j = c1-N ; + S2(i,c1-N) ; + } + } + for (c1=M+N+1;c1<=M+2*N;c1++) { + for (i=1;i<=N;i++) { + j = c1-2*N ; + S3(i,c1-2*N) ; + } + } +} diff --git a/cloog-core/test/gesced2.c b/cloog-core/test/gesced2.c new file mode 100644 index 0000000..5cebdb5 --- /dev/null +++ b/cloog-core/test/gesced2.c @@ -0,0 +1,26 @@ +/* Generated from /home/skimo/git/cloog/test/gesced2.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.03s. */ +for (c1=1;c1<=4;c1++) { + for (c2=5;c2<=M-10;c2++) { + S1(c1,c2); + } +} +for (c1=5;c1<=M-10;c1++) { + for (c2=-c1+1;c2<=4;c2++) { + S2(c1+c2,c1); + } + for (c2=5;c2<=min(M-10,-c1+M);c2++) { + S1(c1,c2); + S2(c1+c2,c1); + } + for (c2=-c1+M+1;c2<=M-10;c2++) { + S1(c1,c2); + } + for (c2=M-9;c2<=-c1+M;c2++) { + S2(c1+c2,c1); + } +} +for (c1=M-9;c1<=M;c1++) { + for (c2=5;c2<=M-10;c2++) { + S1(c1,c2); + } +} diff --git a/cloog-core/test/gesced2.cloog b/cloog-core/test/gesced2.cloog new file mode 100644 index 0000000..982368b --- /dev/null +++ b/cloog-core/test/gesced2.cloog @@ -0,0 +1,82 @@ +# language: C +c + +# parameters {n | n>=16} +1 3 +# n 1 +1 1 -16 +0 + +2 # Number of statements + +1 +# {i, j | 1<=i<=n 5<=j<=n-10} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 0 1 0 -5 +1 0 -1 1 -10 +0 0 0 + +1 +# {i, j | 1<=i<=n 5<=j<=n-10} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 0 1 0 -5 +1 0 -1 1 -10 +0 0 0 +0 + +2 # Scattering functions +# Et les instructions de chunking (sol triviale)... +2 7 +# c1 c2 i j n 1 +0 1 0 -1 0 0 0 +0 0 1 0 -1 0 0 + +2 7 +# c1 c2 i j n 1 +0 1 0 0 -1 0 0 +0 0 1 -1 1 0 0 +0 + +# Et les instructions de chunking (sol aux inverse)... +2 7 +# c1 c2 i j n 1 +0 1 0 -10 -3 0 -5 +0 0 1 -4 -1 0 5 + +2 7 +# c1 c2 i j n 1 +0 1 0 -9 -4 0 -15 +0 0 1 -5 0 0 0 +0 + +2 +# Et les instructions de chunking (sol aux egalites)... +2 7 +# c1 c2 i j n 1 +0 1 0 1 -2 0 -30 +0 0 1 -1 1 0 30 + +2 7 +# c1 c2 i j n 1 +0 1 0 -1 1 0 15 +0 0 1 1 -2 0 -30 +0 + +# Et les instructions de chunking (sol triviale)... +2 7 +# c1 c2 i j n 1 +0 1 0 -1 0 0 0 +0 0 1 0 -1 0 5 + +2 7 +# c1 c2 i j n 1 +0 1 0 0 -1 0 -10 +0 0 1 -1 0 0 0 +0 + diff --git a/cloog-core/test/gesced2.good.c b/cloog-core/test/gesced2.good.c new file mode 100644 index 0000000..669093a --- /dev/null +++ b/cloog-core/test/gesced2.good.c @@ -0,0 +1,69 @@ +/* Generated from ../../../git/cloog/test/gesced2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.04s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j; + for (c1=1;c1<=4;c1++) { + for (c2=5;c2<=M-10;c2++) { + S1(c1,c2) ; + } + } + for (c1=5;c1<=min(M-10,9);c1++) { + for (c2=-c1+1;c2<=4;c2++) { + i = c1+c2 ; + S2(c1+c2,c1) ; + } + for (c2=5;c2<=M-10;c2++) { + S1(c1,c2) ; + i = c1+c2 ; + S2(c1+c2,c1) ; + } + for (c2=M-9;c2<=-c1+M;c2++) { + i = c1+c2 ; + S2(c1+c2,c1) ; + } + } + if (M >= 20) { + for (c2=-9;c2<=4;c2++) { + i = c2+10 ; + S2(c2+10,10) ; + } + for (c2=5;c2<=M-10;c2++) { + S1(10,c2) ; + i = c2+10 ; + S2(c2+10,10) ; + } + } + for (c1=11;c1<=M-10;c1++) { + for (c2=-c1+1;c2<=4;c2++) { + i = c1+c2 ; + S2(c1+c2,c1) ; + } + for (c2=5;c2<=-c1+M;c2++) { + S1(c1,c2) ; + i = c1+c2 ; + S2(c1+c2,c1) ; + } + for (c2=-c1+M+1;c2<=M-10;c2++) { + S1(c1,c2) ; + } + } + for (c1=M-9;c1<=M;c1++) { + for (c2=5;c2<=M-10;c2++) { + S1(c1,c2) ; + } + } +} diff --git a/cloog-core/test/gesced3.c b/cloog-core/test/gesced3.c new file mode 100644 index 0000000..8d2119d --- /dev/null +++ b/cloog-core/test/gesced3.c @@ -0,0 +1,11 @@ +/* Generated from ../../../git/cloog/test/gesced3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +for (c1=M+1;c1<=2*M;c1++) { + S1(c1-M) ; +} +for (c1=2*M+1;c1<=M+N;c1++) { + S2(c1-2*M) ; + S1(c1-M) ; +} +for (c1=M+N+1;c1<=2*M+N;c1++) { + S2(c1-2*M) ; +} diff --git a/cloog-core/test/gesced3.cloog b/cloog-core/test/gesced3.cloog new file mode 100644 index 0000000..758924c --- /dev/null +++ b/cloog-core/test/gesced3.cloog @@ -0,0 +1,39 @@ +# language: C +c + +# parametres {n | n>=m m>=2} +2 4 +# m n 1 +1 -1 1 0 +1 1 0 -2 +0 + +2 # Number of statements + +1 +# {i | 1<=i<=n} +2 5 +# i m n 1 +1 1 0 0 -1 +1 -1 0 1 0 +0 0 0 + +1 +# {i | 1<=i<=n} +2 5 +# i m n 1 +1 1 0 0 -1 +1 -1 0 1 0 +0 0 0 +0 + +2 +# Et les instructions de chunking (sol triviale)... +1 6 +# c1 i m n 1 +0 1 -1 -1 0 0 + +1 6 +# c1 i m n 1 +0 1 -1 -2 0 0 +0 diff --git a/cloog-core/test/gesced3.good.c b/cloog-core/test/gesced3.good.c new file mode 100644 index 0000000..43708fc --- /dev/null +++ b/cloog-core/test/gesced3.good.c @@ -0,0 +1,33 @@ +/* Generated from ../../../git/cloog/test/gesced3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i; + for (c1=M+1;c1<=2*M;c1++) { + i = c1-M ; + S1(c1-M) ; + } + for (c1=2*M+1;c1<=M+N;c1++) { + i = c1-2*M ; + S2(c1-2*M) ; + i = c1-M ; + S1(c1-M) ; + } + for (c1=M+N+1;c1<=2*M+N;c1++) { + i = c1-2*M ; + S2(c1-2*M) ; + } +} diff --git a/cloog-core/test/guide.c b/cloog-core/test/guide.c new file mode 100644 index 0000000..31e9db1 --- /dev/null +++ b/cloog-core/test/guide.c @@ -0,0 +1,9 @@ +/* Generated from ../../../git/cloog/test/guide.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ +if (N >= 1) { + for (i=1;i<=N;i++) { + S1(i); + } + for (i=N+1;i<=2*N;i++) { + S2(i); + } +} diff --git a/cloog-core/test/guide.cloog b/cloog-core/test/guide.cloog new file mode 100644 index 0000000..5a35582 --- /dev/null +++ b/cloog-core/test/guide.cloog @@ -0,0 +1,35 @@ +# Language is C +c + +# The context (no constraints on parameters) +1 4 # 1 lines and 4 columns +# m n 1 +1 0 0 0 # 0 >= 0, always true +0 # CLooG will set parameters names automatically + +2 # The number of statements + +2 # First statement +# The first domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 -1 2 0 0 # i <= 2*m +# The second domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 1 -1 0 0 # i >= m +0 0 0 + +1 # Second statement +2 5 # 4 lines and 6 columns +# i m n 1 +1 1 0 -1 -1 # i >= 1 +1 -1 0 2 0 # i <= n +0 0 0 +0 # CLooG will set iterators names automatically + +0 diff --git a/cloog-core/test/guide.good.c b/cloog-core/test/guide.good.c new file mode 100644 index 0000000..31e0346 --- /dev/null +++ b/cloog-core/test/guide.good.c @@ -0,0 +1,28 @@ +/* Generated from ../../../git/cloog/test/guide.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i; + for (i=1;i<=N;i++) { + if (i >= M) { + S1(i) ; + } + if (i <= min(2*M,M-1)) { + S1(i) ; + } + } + for (i=N+1;i<=2*N;i++) { + S2(i) ; + } +} diff --git a/cloog-core/test/iftest.c b/cloog-core/test/iftest.c new file mode 100644 index 0000000..8f95ef8 --- /dev/null +++ b/cloog-core/test/iftest.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/iftest.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ +if (n >= 1) { + for (i=1;i<=n;i++) { + S1(i); + } +} diff --git a/cloog-core/test/iftest.cloog b/cloog-core/test/iftest.cloog new file mode 100644 index 0000000..0adbc8d --- /dev/null +++ b/cloog-core/test/iftest.cloog @@ -0,0 +1,28 @@ +# language: C +c +# The context (no constraints on parameters) +1 4 # 1 lines and 4 columns +# m n 1 +1 0 0 0 +1 +m n + +1 # The number of statements + +2 # First statement +# The first domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 1 -1 0 0 # i >= m +# The second domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 -1 2 0 0 # i <= 2*m +0 0 0 +0 + +0 diff --git a/cloog-core/test/iftest.good.c b/cloog-core/test/iftest.good.c new file mode 100644 index 0000000..4ce26e4 --- /dev/null +++ b/cloog-core/test/iftest.good.c @@ -0,0 +1,24 @@ +/* Generated from ../../../git/cloog/test/iftest.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } + +void test(int m, int n) +{ + /* Original iterators. */ + int i; + for (i=1;i<=n;i++) { + if (i <= 2*m) { + S1(i) ; + } + if (i >= max(m,2*m+1)) { + S1(i) ; + } + } +} diff --git a/cloog-core/test/iftest2.c b/cloog-core/test/iftest2.c new file mode 100644 index 0000000..355aa74 --- /dev/null +++ b/cloog-core/test/iftest2.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/iftest2.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. */ +if ((M >= 1) && (N >= 1)) { + for (i=1;i<=N;i++) { + for (j=1;j<=M;j++) { + S1(i,j); + } + } +} diff --git a/cloog-core/test/iftest2.cloog b/cloog-core/test/iftest2.cloog new file mode 100644 index 0000000..2bd7336 --- /dev/null +++ b/cloog-core/test/iftest2.cloog @@ -0,0 +1,31 @@ +# language: C +c +# The context (no constraints on parameters) +1 4 # 1 lines and 4 columns +# m n 1 +1 0 0 0 +0 + +1 # The number of statements + +2 # First statement +# The first domain +5 6 # 3 lines and 5 columns +# i j m n 1 +1 1 0 0 0 -1 # i >= 1 +1 -1 0 0 1 0 # i <= n +1 1 0 -1 0 0 # i >= m +1 0 1 0 0 -1 +1 0 -1 1 0 0 +# The second domain +5 6 # 3 lines and 5 columns +# i j m n 1 +1 1 0 0 0 -1 # i >= 1 +1 -1 0 0 1 0 # i <= n +1 -1 0 2 0 0 # i <= 2*m +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 diff --git a/cloog-core/test/iftest2.good.c b/cloog-core/test/iftest2.good.c new file mode 100644 index 0000000..9e7f514 --- /dev/null +++ b/cloog-core/test/iftest2.good.c @@ -0,0 +1,28 @@ +/* Generated from ../../../git/cloog/test/iftest2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + if (M >= 1) { + for (i=1;i<=N;i++) { + for (j=1;j<=M;j++) { + if (i <= 2*M) { + S1(i,j) ; + } + if (i >= max(M,2*M+1)) { + S1(i,j) ; + } + } + } + } +} diff --git a/cloog-core/test/iftestf.cloog b/cloog-core/test/iftestf.cloog new file mode 100644 index 0000000..1f0d6a9 --- /dev/null +++ b/cloog-core/test/iftestf.cloog @@ -0,0 +1,29 @@ +# language: FORTRAN +f + +# The context (no constraints on parameters) +1 4 # 1 lines and 4 columns +# m n 1 +1 0 0 0 +1 +m n + +1 # The number of statements + +2 # First statement +# The first domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 1 -1 0 0 # i >= m +# The second domain +3 5 # 3 lines and 5 columns +# i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 -1 2 0 0 # i <= 2*m +0 0 0 +0 + +0 diff --git a/cloog-core/test/iftestf.f b/cloog-core/test/iftestf.f new file mode 100644 index 0000000..65685b9 --- /dev/null +++ b/cloog-core/test/iftestf.f @@ -0,0 +1,6 @@ +! Generated from ../../../git/cloog/test/iftestf.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.00s. +IF (n >= 1) THEN + DO i=1, n + S1(i) + END DO +END IF diff --git a/cloog-core/test/infinite.c b/cloog-core/test/infinite.c new file mode 100644 index 0000000..10f35f2 --- /dev/null +++ b/cloog-core/test/infinite.c @@ -0,0 +1,13 @@ +/* Generated from ../../../git/cloog/test/infinite.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +for (;i<=0;i++) { + S1(i) ; +} +for (i=1;i<=N;i++) { + S1(i) ; + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} +for (i=N+1;;i++) { + S1(i) ; +} diff --git a/cloog-core/test/infinite.cloog b/cloog-core/test/infinite.cloog new file mode 100644 index 0000000..dacc187 --- /dev/null +++ b/cloog-core/test/infinite.cloog @@ -0,0 +1,32 @@ +# langage +c + +# parametres {M, N | M>=1 N >=1} +2 4 +# M N 1 +1 1 0 -1 +1 0 1 -1 +0 + +2 # Number of statements + +1 +# {i | 1<=i<=M} +0 5 +# i M N 1 +#1 1 0 0 -1 +#1 -1 1 0 0 +0 0 0 + +1 +# {i, j | 1<=i<=N 1<=j<=M} +4 6 +# i j M N 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/infinite2.c b/cloog-core/test/infinite2.c new file mode 100644 index 0000000..80a0b35 --- /dev/null +++ b/cloog-core/test/infinite2.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/infinite2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (i=1;i<=N;i++) { + S1(i) ; + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} +for (i=N+1;;i++) { + S1(i) ; +} diff --git a/cloog-core/test/infinite2.cloog b/cloog-core/test/infinite2.cloog new file mode 100644 index 0000000..2d7cf97 --- /dev/null +++ b/cloog-core/test/infinite2.cloog @@ -0,0 +1,32 @@ +# langage +c + +# parametres {M, N | M>=1 N >=1} +2 4 +# M N 1 +1 1 0 -1 +1 0 1 -1 +0 + +2 # Number of statements + +1 +# {i | 1<=i<=M} +1 5 +# i M N 1 +1 1 0 0 -1 +#1 -1 1 0 0 +0 0 0 + +1 +# {i, j | 1<=i<=N 1<=j<=M} +4 6 +# i j M N 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/infinite3.c b/cloog-core/test/infinite3.c new file mode 100644 index 0000000..9e4292c --- /dev/null +++ b/cloog-core/test/infinite3.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/infinite3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ +for (;i<=0;i++) { + S1(i) ; +} +for (i=1;i<=min(M,N);i++) { + S1(i) ; + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} +for (i=N+1;i<=M;i++) { + S1(i) ; +} +for (i=M+1;i<=N;i++) { + for (j=1;j<=M;j++) { + S2(i,j) ; + } +} diff --git a/cloog-core/test/infinite3.cloog b/cloog-core/test/infinite3.cloog new file mode 100644 index 0000000..9154a0e --- /dev/null +++ b/cloog-core/test/infinite3.cloog @@ -0,0 +1,32 @@ +# langage +c + +# parametres {M, N | M>=1 N >=1} +2 4 +# M N 1 +1 1 0 -1 +1 0 1 -1 +0 + +2 # Number of statements + +1 +# {i | 1<=i<=M} +1 5 +# i M N 1 +#1 1 0 0 -1 +1 -1 1 0 0 +0 0 0 + +1 +# {i, j | 1<=i<=N 1<=j<=M} +4 6 +# i j M N 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/infinite4.c b/cloog-core/test/infinite4.c new file mode 100644 index 0000000..fff00ed --- /dev/null +++ b/cloog-core/test/infinite4.c @@ -0,0 +1,4 @@ +/* Generated from ../../../git/cloog/test/infinite4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (;;i++) { + S1(i) ; +} diff --git a/cloog-core/test/infinite4.cloog b/cloog-core/test/infinite4.cloog new file mode 100644 index 0000000..5502453 --- /dev/null +++ b/cloog-core/test/infinite4.cloog @@ -0,0 +1,16 @@ +# langage +c + +# Context +0 2 +0 + +1 # Number of statements + +1 +# {i | 1<=i<=M} +0 3 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/isl/mod.c b/cloog-core/test/isl/mod.c new file mode 100644 index 0000000..4f6a15e --- /dev/null +++ b/cloog-core/test/isl/mod.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/isl/mod.cloog by CLooG 0.14.0-325-g71fa959 gmp bits in 0.00s. */ +for (i=0;i<=3;i++) { + if (i%3 <= 1) { + S1(i); + } +} diff --git a/cloog-core/test/isl/mod.cloog b/cloog-core/test/isl/mod.cloog new file mode 100644 index 0000000..e12de40 --- /dev/null +++ b/cloog-core/test/isl/mod.cloog @@ -0,0 +1,23 @@ +c + +# Context: +0 2 + +0 # Parameter name(s) +# Statement number: +1 + +# Iteration domain of statement 1 +4 4 1 0 1 0 +1 1 0 0 +1 -1 0 3 +1 1 -3 0 +1 -1 3 1 + +0 0 0 # For future options. + + +0 # Iterator name(s) + +# No scattering functions. +0 diff --git a/cloog-core/test/isl/mod2.c b/cloog-core/test/isl/mod2.c new file mode 100644 index 0000000..4f6a15e --- /dev/null +++ b/cloog-core/test/isl/mod2.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/isl/mod.cloog by CLooG 0.14.0-325-g71fa959 gmp bits in 0.00s. */ +for (i=0;i<=3;i++) { + if (i%3 <= 1) { + S1(i); + } +} diff --git a/cloog-core/test/isl/mod2.cloog b/cloog-core/test/isl/mod2.cloog new file mode 100644 index 0000000..1b09d5f --- /dev/null +++ b/cloog-core/test/isl/mod2.cloog @@ -0,0 +1,20 @@ +# Language: C +c + +# Context: +0 2 + +0 # Parameter name(s) +# Statement number: +1 + +# Iteration domain of statement 1 +{ [i] : 0 <= i <= 3 and 0 <= i - 3*[i/3] <= 1 } + +0 0 0 # For future options. + + +0 # Iterator name(s) + +# No scattering functions. +0 diff --git a/cloog-core/test/isl/mod3.c b/cloog-core/test/isl/mod3.c new file mode 100644 index 0000000..3fa291b --- /dev/null +++ b/cloog-core/test/isl/mod3.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/isl/mod3.cloog by CLooG 0.14.0-325-g62da9f7 gmp bits in 0.02s. */ +for (i=max(0,32*h0-1991);i<=min(999,32*h0+31);i++) { + if ((63*i+32*h0+31)%64 <= 62) { + for (j=0;j<=999;j++) { + S1(i,j); + } + } +} diff --git a/cloog-core/test/isl/mod3.cloog b/cloog-core/test/isl/mod3.cloog new file mode 100644 index 0000000..1637080 --- /dev/null +++ b/cloog-core/test/isl/mod3.cloog @@ -0,0 +1,34 @@ +# Language: C +c + +# Context: +2 3 +1 -1 93 +1 1 0 + +1 # Parameter name(s) +h0 +# Statement number: +1 + +# Iteration domain of statement 1 +1 + +9 6 2 0 1 1 +1 1 0 0 0 0 +1 -1 0 0 0 999 +1 0 0 -1 0 31 +1 1 0 32 -32 999 +1 0 1 0 0 0 +1 0 -1 0 0 999 +1 1 0 64 -32 31 +1 -1 0 -64 32 31 +1 0 0 1 0 0 + +0 0 0 # For future options. + + +0 # Iterator name(s) + +# No scattering functions. +0 diff --git a/cloog-core/test/isl/mod4.c b/cloog-core/test/isl/mod4.c new file mode 100644 index 0000000..9a30f3c --- /dev/null +++ b/cloog-core/test/isl/mod4.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/isl/mod4.cloog by CLooG 0.16.0-9-g188dbd4 gmp bits in 0.00s. */ +if (M%11 <= 6) { + if (N%5 <= 2) { + if (M >= -N) { + for (i=0;i<=M+N;i++) { + S1(i); + } + } + } +} diff --git a/cloog-core/test/isl/mod4.cloog b/cloog-core/test/isl/mod4.cloog new file mode 100644 index 0000000..d5837ae --- /dev/null +++ b/cloog-core/test/isl/mod4.cloog @@ -0,0 +1,23 @@ +c + +1 + +0 4 + +0 + +1 + +6 7 1 0 2 2 +1 0 -5 0 0 1 0 +1 0 5 0 0 -1 2 +1 0 0 -11 1 0 0 +1 0 0 11 -1 0 6 +1 1 0 0 0 0 0 +1 -1 0 0 1 1 0 + +0 0 0 + +0 + +0 diff --git a/cloog-core/test/largeur.c b/cloog-core/test/largeur.c new file mode 100644 index 0000000..ff49b94 --- /dev/null +++ b/cloog-core/test/largeur.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/largeur.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (M >= 1) { + for (c1=1;c1<=M;c1++) { + for (c2=1;c2<=c1;c2++) { + S1(c2,c1) ; + } + } +} diff --git a/cloog-core/test/largeur.cloog b/cloog-core/test/largeur.cloog new file mode 100644 index 0000000..fe372da --- /dev/null +++ b/cloog-core/test/largeur.cloog @@ -0,0 +1,26 @@ +# language: C +c + +# parameters {n | n>= 0} +1 3 +1 1 0 +0 + +1 # Number of statements + +1 +# {i, j | 1<=i<=n i<=j<=n} +4 5 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 0 +1 0 -1 1 0 +0 0 0 +0 + +1 # Scattering functions +# Et les instructions de chunking... +2 7 +0 1 0 0 -1 0 0 +0 0 1 -1 0 0 0 +0 diff --git a/cloog-core/test/largeur.good.c b/cloog-core/test/largeur.good.c new file mode 100644 index 0000000..10f63ed --- /dev/null +++ b/cloog-core/test/largeur.good.c @@ -0,0 +1,23 @@ +/* Generated from ../../../git/cloog/test/largeur.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j; + for (c1=1;c1<=M;c1++) { + for (c2=1;c2<=c1;c2++) { + S1(c2,c1) ; + } + } +} diff --git a/cloog-core/test/levenshtein-1-2-3.c b/cloog-core/test/levenshtein-1-2-3.c new file mode 100644 index 0000000..224bd29 --- /dev/null +++ b/cloog-core/test/levenshtein-1-2-3.c @@ -0,0 +1,37 @@ +/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.12s. */ +S1(0,0) ; +S2(1,0) ; +S3(1,1) ; +for (i=2;i<=N;i++) { + S2(i,0) ; + for (j=1;j<=i-1;j++) { + S6(i,j) ; + } + S3(i,i) ; +} +S7(N+1,0) ; +for (j=1;j<=N;j++) { + S6(N+1,j) ; + S8(N+1,j) ; +} +for (i=N+2;i<=2*M-N-2;i++) { + j = floord(i-N-1,2) ; + S7(i,j) ; + if ((i+N)%2 == 0) { + S5(i,(i-N)/2) ; + S8(i,(i-N)/2) ; + } + for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) { + S6(i,j) ; + S8(i,j) ; + } + if ((i+N)%2 == 0) { + S4(i,(i+N)/2) ; + S8(i,(i+N)/2) ; + } +} +for (i=2*M-N-1;i<=2*M-2;i++) { + for (j=i-M+1;j<=M-1;j++) { + S6(i,j) ; + } +} diff --git a/cloog-core/test/levenshtein-1-2-3.cloog b/cloog-core/test/levenshtein-1-2-3.cloog new file mode 100644 index 0000000..acc6522 --- /dev/null +++ b/cloog-core/test/levenshtein-1-2-3.cloog @@ -0,0 +1,110 @@ +# language: C +c + +# Context +# {length,width | width+2<=length; 1<=width} +3 4 +# M N 1 +1 1 -1 -2 +1 0 1 -1 +1 0 0 1 +0 + +8 # Number of statements + +1 +# {t1,t2,length,width | t1=0; t2=0; width+2<=length; 1<=width} +5 6 +# i j M N 1 +0 1 0 0 0 0 +0 0 1 0 0 0 +1 0 0 1 -1 -2 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | 1<=t1<=width; t2=0; width+2<=length} +5 6 +# i j M N 1 +0 0 1 0 0 0 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 0 1 -1 -2 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | t1=t2; 1<=t2<=width; width+2<=length} +5 6 +# i j M N 1 +0 1 -1 0 0 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 -1 -2 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | t1=2t2-width; width+1<=t2<=length-1; 1<=width} +5 6 +# i j M N 1 +0 1 -2 0 1 0 +1 0 1 0 -1 -1 +1 0 -1 1 0 -1 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | t1=2t2+width; 1<=t2<=length-width-1; 1<=width} +5 6 +# i j M N 1 +0 1 -2 0 -1 0 +1 0 1 0 0 -1 +1 0 -1 1 -1 -1 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | (2t2-width+1,t2+1)<=t1<=(t2+length-1,2t2+width-1); 1<=t2<=length-1; width+2<=length} +8 6 +# i j M N 1 +1 1 -2 0 1 -1 +1 1 -1 0 0 -1 +1 -1 1 1 0 -1 +1 -1 2 0 1 -1 +1 0 1 0 0 -1 +1 0 -1 1 0 -1 +1 0 0 1 -1 -2 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | (width+1,2t2+width+1)<=t1<=(2length-width-2,2t2+width+2); width+2<=length; 1<=width} +6 6 +# i j M N 1 +1 1 0 0 -1 -1 +1 1 -2 0 -1 -1 +1 -1 0 2 -1 -2 +1 -1 2 0 1 2 +1 0 0 1 -1 -2 +1 0 0 0 1 -1 +0 0 0 + +1 +# {t1,t2,length,width | (width+1,2t2-width)<=t1<=(2t2+width,2length-width-2); width+2<=length; 1<=width} +7 6 +# i j M N 1 +1 1 0 0 -1 -1 +1 1 -2 0 1 0 +1 -1 2 0 1 0 +1 -1 0 2 -1 -2 +1 0 0 1 -1 -2 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/levenshtein-1-2-3.good.c b/cloog-core/test/levenshtein-1-2-3.good.c new file mode 100644 index 0000000..76548ea --- /dev/null +++ b/cloog-core/test/levenshtein-1-2-3.good.c @@ -0,0 +1,62 @@ +/* Generated from ../../../git/cloog/test/levenshtein-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i,j) { hash(5); hash(i); hash(j); } +#define S6(i,j) { hash(6); hash(i); hash(j); } +#define S7(i,j) { hash(7); hash(i); hash(j); } +#define S8(i,j) { hash(8); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + S1(0,0) ; + S2(1,0) ; + S3(1,1) ; + for (i=2;i<=N;i++) { + S2(i,0) ; + for (j=1;j<=i-1;j++) { + S6(i,j) ; + } + S3(i,i) ; + } + i = N+1 ; + S7(N+1,0) ; + for (j=1;j<=N;j++) { + S6(N+1,j) ; + S8(N+1,j) ; + } + for (i=N+2;i<=2*M-N-2;i++) { + j = floord(i-N-1,2) ; + S7(i,j) ; + if ((i+N)%2 == 0) { + j = (i-N)/2 ; + S5(i,(i-N)/2) ; + S8(i,(i-N)/2) ; + } + for (j=ceild(i-N+1,2);j<=floord(i+N-1,2);j++) { + S6(i,j) ; + S8(i,j) ; + } + if ((i+N)%2 == 0) { + j = (i+N)/2 ; + S4(i,(i+N)/2) ; + S8(i,(i+N)/2) ; + } + } + for (i=2*M-N-1;i<=2*M-2;i++) { + for (j=i-M+1;j<=M-1;j++) { + S6(i,j) ; + } + } +} diff --git a/cloog-core/test/levenshtein-1-2-3f.cloog b/cloog-core/test/levenshtein-1-2-3f.cloog new file mode 100644 index 0000000..c78bc19 --- /dev/null +++ b/cloog-core/test/levenshtein-1-2-3f.cloog @@ -0,0 +1,110 @@ +# language: FORTRAN +f + +# Context +# {length,width | width+2<=length; 1<=width} +3 4 +# M N 1 +1 1 -1 -2 +1 0 1 -1 +1 0 0 1 +0 + +8 # Number of statements + +1 +# {t1,t2,length,width | t1=0; t2=0; width+2<=length; 1<=width} +5 6 +# i j M N 1 +0 1 0 0 0 0 +0 0 1 0 0 0 +1 0 0 1 -1 -2 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | 1<=t1<=width; t2=0; width+2<=length} +5 6 +# i j M N 1 +0 0 1 0 0 0 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 0 1 -1 -2 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | t1=t2; 1<=t2<=width; width+2<=length} +5 6 +# i j M N 1 +0 1 -1 0 0 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 -1 -2 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | t1=2t2-width; width+1<=t2<=length-1; 1<=width} +5 6 +# i j M N 1 +0 1 -2 0 1 0 +1 0 1 0 -1 -1 +1 0 -1 1 0 -1 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | t1=2t2+width; 1<=t2<=length-width-1; 1<=width} +5 6 +# i j M N 1 +0 1 -2 0 -1 0 +1 0 1 0 0 -1 +1 0 -1 1 -1 -1 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | (2t2-width+1,t2+1)<=t1<=(t2+length-1,2t2+width-1); 1<=t2<=length-1; width+2<=length} +8 6 +# i j M N 1 +1 1 -2 0 1 -1 +1 1 -1 0 0 -1 +1 -1 1 1 0 -1 +1 -1 2 0 1 -1 +1 0 1 0 0 -1 +1 0 -1 1 0 -1 +1 0 0 1 -1 -2 +1 0 0 0 0 1 +0 0 0 + +1 +# {t1,t2,length,width | (width+1,2t2+width+1)<=t1<=(2length-width-2,2t2+width+2); width+2<=length; 1<=width} +6 6 +# i j M N 1 +1 1 0 0 -1 -1 +1 1 -2 0 -1 -1 +1 -1 0 2 -1 -2 +1 -1 2 0 1 2 +1 0 0 1 -1 -2 +1 0 0 0 1 -1 +0 0 0 + +1 +# {t1,t2,length,width | (width+1,2t2-width)<=t1<=(2t2+width,2length-width-2); width+2<=length; 1<=width} +7 6 +# i j M N 1 +1 1 0 0 -1 -1 +1 1 -2 0 1 0 +1 -1 2 0 1 0 +1 -1 0 2 -1 -2 +1 0 0 1 -1 -2 +1 0 0 0 1 -1 +1 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/levenshtein-1-2-3f.f b/cloog-core/test/levenshtein-1-2-3f.f new file mode 100644 index 0000000..5a57950 --- /dev/null +++ b/cloog-core/test/levenshtein-1-2-3f.f @@ -0,0 +1,37 @@ +! Generated from ../../../git/cloog/test/levenshtein-1-2-3f.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.11s. +S1(0,0) +S2(1,0) +S3(1,1) +DO i=2, N + S2(i,0) + DO j=1, i-1 + S6(i,j) + END DO + S3(i,i) +END DO +S7(N+1,0) +DO j=1, N + S6(N+1,j) + S8(N+1,j) +END DO +DO i=N+2, 2*M-N-2 + j = FLOOR(REAL(i-N-1)/REAL(2)) + S7(i,j) + IF (MOD(i+N, 2) == 0) THEN + S5(i,(i-N)/2) + S8(i,(i-N)/2) + END IF + DO j=CEILING(REAL(i-N+1)/REAL(2)), FLOOR(REAL(i+N-1)/REAL(2)) + S6(i,j) + S8(i,j) + END DO + IF (MOD(i+N, 2) == 0) THEN + S4(i,(i+N)/2) + S8(i,(i+N)/2) + END IF +END DO +DO i=2*M-N-1, 2*M-2 + DO j=i-M+1, M-1 + S6(i,j) + END DO +END DO diff --git a/cloog-core/test/lex.c b/cloog-core/test/lex.c new file mode 100644 index 0000000..52df96d --- /dev/null +++ b/cloog-core/test/lex.c @@ -0,0 +1,5 @@ +/* Generated from /home/skimo/git/cloog/test/lex.cloog by CLooG 0.14.0-234-g330f397 gmp bits in 0.00s. */ +for (c1=0;c1<=10;c1++) { + S2(c1); + S1(c1); +} diff --git a/cloog-core/test/lex.cloog b/cloog-core/test/lex.cloog new file mode 100644 index 0000000..a7e2b88 --- /dev/null +++ b/cloog-core/test/lex.cloog @@ -0,0 +1,35 @@ +c + +0 2 + +0 + +2 + +1 +2 3 +1 1 0 +1 -1 10 +0 0 0 + +1 +2 3 +1 1 0 +1 -1 10 +0 0 0 + +0 + +2 + +3 6 +0 -1 0 0 1 0 +0 0 -1 0 0 0 +0 0 0 -1 0 0 + +3 6 +0 -1 0 0 1 0 +0 0 -1 0 0 -1 +0 0 0 -1 0 0 + +0 diff --git a/cloog-core/test/lex.good.c b/cloog-core/test/lex.good.c new file mode 100644 index 0000000..4769fb1 --- /dev/null +++ b/cloog-core/test/lex.good.c @@ -0,0 +1,23 @@ +/* Generated from /home/skimo/git/cloog/test/lex.cloog by CLooG 0.14.0-234-g330f397 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } + +void test() +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i; + for (c1=0;c1<=10;c1++) { + S2(c1); + S1(c1); + } +} diff --git a/cloog-core/test/lineality-1-2.c b/cloog-core/test/lineality-1-2.c new file mode 100644 index 0000000..9bd902e --- /dev/null +++ b/cloog-core/test/lineality-1-2.c @@ -0,0 +1,11 @@ +/* Generated from /home/skimo/git/cloog/test/lineality-1-2.cloog by CLooG 0.14.0-284-g5c046c9 gmp bits in 0.00s. */ +for (i=1;i<=M;i++) { + for (j=1;j<=i-1;j++) { + S1(i,j); + } + S1(i,i); + S2(i,i); + for (j=i+1;j<=M;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/lineality-1-2.cloog b/cloog-core/test/lineality-1-2.cloog new file mode 100644 index 0000000..7629fd8 --- /dev/null +++ b/cloog-core/test/lineality-1-2.cloog @@ -0,0 +1,36 @@ +# language: C +c + +# Context +# {M | 2<=M} +2 3 +# M 1 +1 1 -2 +1 0 1 +0 + +2 # Number of statements + +1 +# {i,j,M | 1<=i<=M; 1<=j<=M} +5 5 +# i j M 1 +1 1 0 0 -1 +1 0 1 0 -1 +1 -1 0 1 0 +1 0 -1 1 0 +1 0 0 0 1 +0 0 0 + +1 +# {i,j,M | i=j; 1<=j<=M} +4 5 +# i j M 1 +0 1 -1 0 0 +1 0 1 0 -1 +1 0 -1 1 0 +1 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/lineality-1-2.good.c b/cloog-core/test/lineality-1-2.good.c new file mode 100644 index 0000000..d28268f --- /dev/null +++ b/cloog-core/test/lineality-1-2.good.c @@ -0,0 +1,37 @@ +/* Generated from ../../../git/cloog/test/lineality-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + S1(1,1) ; + S2(1,1) ; + for (j=2;j<=M;j++) { + S1(1,j) ; + } + for (i=2;i<=M-1;i++) { + for (j=1;j<=i-1;j++) { + S1(i,j) ; + } + S1(i,i) ; + S2(i,i) ; + for (j=i+1;j<=M;j++) { + S1(i,j) ; + } + } + for (j=1;j<=M-1;j++) { + S1(M,j) ; + } + S1(M,M) ; + S2(M,M) ; +} diff --git a/cloog-core/test/lineality-2-1-2.c b/cloog-core/test/lineality-2-1-2.c new file mode 100644 index 0000000..37a7e2a --- /dev/null +++ b/cloog-core/test/lineality-2-1-2.c @@ -0,0 +1,16 @@ +/* Generated from /home/skimo/git/cloog/test/lineality-2-1-2.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ +for (i=1;i<=M;i++) { + for (j=1;j<=min(M,i+1);j++) { + S1(i,j); + } + if (i >= M-1) { + S2(i,i+2); + } + if (i <= M-2) { + S1(i,i+2); + S2(i,i+2); + } + for (j=i+3;j<=M;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/lineality-2-1-2.cloog b/cloog-core/test/lineality-2-1-2.cloog new file mode 100644 index 0000000..a6ae5e1 --- /dev/null +++ b/cloog-core/test/lineality-2-1-2.cloog @@ -0,0 +1,36 @@ +# language: C +c + +# Context +# {M | 2<=M} +2 3 +# M 1 +1 1 -2 +1 0 1 +0 + +2 # Number of statements + +1 +# {i,j,M | 1<=i<=M; 1<=j<=M} +5 5 +# i j M 1 +1 1 0 0 -1 +1 0 1 0 -1 +1 -1 0 1 0 +1 0 -1 1 0 +1 0 0 0 1 +0 0 0 + +1 +# {i,j,M | i=j-2; 3<=j<=M+2} +4 5 +# i j M 1 +0 1 -1 0 2 +1 0 1 0 -3 +1 0 -1 1 2 +1 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/lineality-2-1-2.good.c b/cloog-core/test/lineality-2-1-2.good.c new file mode 100644 index 0000000..78d8126 --- /dev/null +++ b/cloog-core/test/lineality-2-1-2.good.c @@ -0,0 +1,43 @@ +/* Generated from ../../../git/cloog/test/lineality-2-1-2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + for (i=1;i<=M-3;i++) { + for (j=1;j<=i+1;j++) { + S1(i,j) ; + } + j = i+2 ; + S1(i,i+2) ; + S2(i,i+2) ; + for (j=i+3;j<=M;j++) { + S1(i,j) ; + } + } + if (M >= 3) { + i = M-2 ; + for (j=1;j<=M-1;j++) { + S1(M-2,j) ; + } + S1(M-2,M) ; + S2(M-2,M) ; + } + for (i=M-1;i<=M;i++) { + for (j=1;j<=M;j++) { + S1(i,j) ; + } + j = i+2 ; + S2(i,i+2) ; + } +} diff --git a/cloog-core/test/logo.c b/cloog-core/test/logo.c new file mode 100644 index 0000000..54d229d --- /dev/null +++ b/cloog-core/test/logo.c @@ -0,0 +1,21 @@ +/* Generated from /home/skimo/git/cloog/test/logo.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ +for (j=0;j<=7;j++) { + S1(1,j); +} +for (i=2;i<=6;i++) { + for (j=0;j<=i-2;j++) { + S2(i,j); + } + for (j=i-1;j<=4;j++) { + S1(i,j); + S2(i,j); + } + for (j=5;j<=7;j++) { + S1(i,j); + } +} +for (i=7;i<=8;i++) { + for (j=i-1;j<=7;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/logo.cloog b/cloog-core/test/logo.cloog new file mode 100644 index 0000000..5583c29 --- /dev/null +++ b/cloog-core/test/logo.cloog @@ -0,0 +1,30 @@ +# language: C +c + +# Context +1 3 +# n 1 +1 0 1 +0 + +2 # Number of statements + +1 +3 5 +# i j n 1 +1 1 0 0 -1 # i >= 1 +1 0 -1 0 7 # j <= 7 +1 -1 1 0 1 # j >= i-1 +0 0 0 + +1 +4 5 +# i j n 1 +1 1 0 0 -2 # i >= 2 +1 -1 0 0 6 # i <= 6 +1 0 1 0 0 # j >= 0 +1 0 -1 0 4 # j <= 4 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/logo.good.c b/cloog-core/test/logo.good.c new file mode 100644 index 0000000..203e5ac --- /dev/null +++ b/cloog-core/test/logo.good.c @@ -0,0 +1,43 @@ +/* Generated from ../../../git/cloog/test/logo.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + for (j=0;j<=7;j++) { + S1(1,j) ; + } + for (i=2;i<=5;i++) { + for (j=0;j<=i-2;j++) { + S2(i,j) ; + } + for (j=i-1;j<=4;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=5;j<=7;j++) { + S1(i,j) ; + } + } + for (j=0;j<=4;j++) { + S2(6,j) ; + } + for (j=5;j<=7;j++) { + S1(6,j) ; + } + for (i=7;i<=8;i++) { + for (j=i-1;j<=7;j++) { + S1(i,j) ; + } + } +} diff --git a/cloog-core/test/logopar.c b/cloog-core/test/logopar.c new file mode 100644 index 0000000..0b2c8f9 --- /dev/null +++ b/cloog-core/test/logopar.c @@ -0,0 +1,21 @@ +/* Generated from /home/skimo/git/cloog/test/logopar.cloog by CLooG 0.14.0-284-g5c046c9 gmp bits in 0.00s. */ +for (j=0;j<=m;j++) { + S1(1,j); +} +for (i=2;i<=n;i++) { + for (j=0;j<=i-2;j++) { + S2(i,j); + } + for (j=i-1;j<=n;j++) { + S1(i,j); + S2(i,j); + } + for (j=n+1;j<=m;j++) { + S1(i,j); + } +} +for (i=n+1;i<=m+1;i++) { + for (j=i-1;j<=m;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/logopar.cloog b/cloog-core/test/logopar.cloog new file mode 100644 index 0000000..37114ae --- /dev/null +++ b/cloog-core/test/logopar.cloog @@ -0,0 +1,33 @@ +# language: C +c + +# Context +3 4 +# m n 1 +1 1 -1 0 # m > n +1 1 0 0 # m >= 0 +1 0 1 -2 # n >= 2 +1 +m n + +2 # Number of statements + +1 +3 6 +# i j m n 1 +1 1 0 0 0 -1 # i >= 1 +1 0 -1 1 0 0 # j <= m +1 -1 1 0 0 1 # j >= i-1 +0 0 0 + +1 +4 6 +# i j m n 1 +1 1 0 0 0 -2 # i >= 2 +1 -1 0 0 1 0 # i <= n +1 0 1 0 0 0 # j >= 0 +1 0 -1 0 1 0 # j <= n +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/logopar.good.c b/cloog-core/test/logopar.good.c new file mode 100644 index 0000000..2b03ca2 --- /dev/null +++ b/cloog-core/test/logopar.good.c @@ -0,0 +1,50 @@ +/* Generated from ../../../git/cloog/test/logopar.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int m, int n) +{ + /* Original iterators. */ + int i, j; + for (j=0;j<=m;j++) { + S1(1,j) ; + } + if (m >= n+1) { + for (i=2;i<=n;i++) { + for (j=0;j<=i-2;j++) { + S2(i,j) ; + } + for (j=i-1;j<=n;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=n+1;j<=m;j++) { + S1(i,j) ; + } + } + } + if (m == n) { + for (i=2;i<=n;i++) { + for (j=0;j<=i-2;j++) { + S2(i,j) ; + } + for (j=i-1;j<=n;j++) { + S1(i,j) ; + S2(i,j) ; + } + } + } + for (i=n+1;i<=m+1;i++) { + for (j=i-1;j<=m;j++) { + S1(i,j) ; + } + } +} diff --git a/cloog-core/test/lu.c b/cloog-core/test/lu.c new file mode 100644 index 0000000..74ec81f --- /dev/null +++ b/cloog-core/test/lu.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/lu.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ +if (n >= 2) { + for (j=2;j<=n;j++) { + S1(1,j); + } + for (c1=2;c1<=n-1;c1++) { + for (c2=2;c2<=n;c2++) { + for (i=1;i<=min(c1-1,c2-1);i++) { + S2(i,c2,c1); + } + } + for (j=c1+1;j<=n;j++) { + S1(c1,j); + } + } + for (c2=2;c2<=n;c2++) { + for (i=1;i<=c2-1;i++) { + S2(i,c2,n); + } + } +} diff --git a/cloog-core/test/lu.cloog b/cloog-core/test/lu.cloog new file mode 100644 index 0000000..7753006 --- /dev/null +++ b/cloog-core/test/lu.cloog @@ -0,0 +1,47 @@ +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +1 +n + +2 # Number of statements + +1 +# {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 + +1 +# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 +0 + +2 # Scattering functions +# Et les instructions de chunking... +2 7 +# c1 c2 i j n 1 +0 1 0 -1 0 0 0 +0 0 1 0 0 -1 0 + +2 8 +# c1 c2 i j k n 1 +0 1 0 0 0 -1 0 0 +0 0 1 0 -1 0 0 0 +0 diff --git a/cloog-core/test/lu.good.c b/cloog-core/test/lu.good.c new file mode 100644 index 0000000..5e9d3d2 --- /dev/null +++ b/cloog-core/test/lu.good.c @@ -0,0 +1,44 @@ +/* Generated from ../../../git/cloog/test/lu.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } + +void test(int n) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j, k; + if (n >= 2) { + for (j=2;j<=n;j++) { + S1(1,j) ; + } + } + for (c1=2;c1<=n-1;c1++) { + for (c2=2;c2<=n-1;c2++) { + for (i=1;i<=min(c2-1,c1-1);i++) { + S2(i,c2,c1) ; + } + } + for (i=1;i<=c1-1;i++) { + S2(i,n,c1) ; + } + for (j=c1+1;j<=n;j++) { + S1(c1,j) ; + } + } + if (n >= 2) { + for (c2=2;c2<=n;c2++) { + for (i=1;i<=c2-1;i++) { + S2(i,c2,n) ; + } + } + } +} diff --git a/cloog-core/test/lu2.c b/cloog-core/test/lu2.c new file mode 100644 index 0000000..2f3b34b --- /dev/null +++ b/cloog-core/test/lu2.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/lu2.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.01s. */ +if (n >= 2) { + for (l=2;l<=n;l++) { + S1(1,n,1,l); + } + for (i=2;i<=n-1;i++) { + for (j=2;j<=n;j++) { + for (k=1;k<=min(i-1,j-1);k++) { + S2(i,j,k,j,i); + } + } + for (l=i+1;l<=n;l++) { + S1(i,n,i,l); + } + } + for (j=2;j<=n;j++) { + for (k=1;k<=j-1;k++) { + S2(n,j,k,j,n); + } + } +} diff --git a/cloog-core/test/lu2.cloog b/cloog-core/test/lu2.cloog new file mode 100644 index 0000000..5775e49 --- /dev/null +++ b/cloog-core/test/lu2.cloog @@ -0,0 +1,37 @@ +# language: C +c + +# parameter n +1 3 +1 0 1 +1 +n + +2 # Number of statements + +1 +# {c1, c2, i, j | c1=i, c2=n, 1<=i<=n; i+1<=j<=n} +6 7 +0 1 0 -1 0 0 0 +0 0 1 0 0 -1 0 +1 0 0 1 0 0 -1 +1 0 0 -1 0 1 0 +1 0 0 -1 1 0 -1 +1 0 0 0 -1 1 0 +0 0 0 + +1 +# {c1, c2, i, j, k | c1=k, c2=j, 1<=i<=n; i+1<=j<=n i+1<=k<=n} +8 8 +0 1 0 0 0 -1 0 0 +0 0 1 0 -1 0 0 0 +1 0 0 1 0 0 0 -1 +1 0 0 -1 0 0 1 0 +1 0 0 -1 1 0 0 -1 +1 0 0 0 -1 0 1 0 +1 0 0 -1 0 1 0 -1 +1 0 0 0 0 -1 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/lu2.good.c b/cloog-core/test/lu2.good.c new file mode 100644 index 0000000..5641856 --- /dev/null +++ b/cloog-core/test/lu2.good.c @@ -0,0 +1,42 @@ +/* Generated from ../../../git/cloog/test/lu2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } +#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } + +void test(int n) +{ + /* Original iterators. */ + int i, j, k, l, m; + if (n >= 2) { + for (l=2;l<=n;l++) { + S1(1,n,1,l) ; + } + } + for (i=2;i<=n-1;i++) { + for (j=2;j<=n-1;j++) { + for (k=1;k<=min(j-1,i-1);k++) { + S2(i,j,k,j,i) ; + } + } + for (k=1;k<=i-1;k++) { + S2(i,n,k,n,i) ; + } + for (l=i+1;l<=n;l++) { + S1(i,n,i,l) ; + } + } + if (n >= 2) { + for (j=2;j<=n;j++) { + for (k=1;k<=j-1;k++) { + S2(n,j,k,j,n) ; + } + } + } +} diff --git a/cloog-core/test/lub.c b/cloog-core/test/lub.c new file mode 100644 index 0000000..43269a4 --- /dev/null +++ b/cloog-core/test/lub.c @@ -0,0 +1,13 @@ +/* Generated from ../../../git/cloog/test/lub.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +if (M >= 2) { + for (i=1;i<=M-1;i++) { + for (j=i+1;j<=M;j++) { + S1(i,j) ; + for (k=i+1;k<=M;k++) { + S2(i,j,k) ; + S3(i,j,k) ; + } + S4(i,j) ; + } + } +} diff --git a/cloog-core/test/lub.cloog b/cloog-core/test/lub.cloog new file mode 100644 index 0000000..fcab9b5 --- /dev/null +++ b/cloog-core/test/lub.cloog @@ -0,0 +1,58 @@ +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +0 + +4 # Number of statements + +1 +# {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 + +1 +# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 + +1 +# {i, j, k | 1<=i<=n; i+1<=j<=n i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 + +1 +# {i, j | 1<=i<=n; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 +0 + +0 # Scattering functions + diff --git a/cloog-core/test/lub.good.c b/cloog-core/test/lub.good.c new file mode 100644 index 0000000..3122a3c --- /dev/null +++ b/cloog-core/test/lub.good.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/lub.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#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) { hash(4); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j, k; + for (i=1;i<=M-1;i++) { + for (j=i+1;j<=M;j++) { + S1(i,j) ; + for (k=i+1;k<=M;k++) { + S2(i,j,k) ; + S3(i,j,k) ; + } + S4(i,j) ; + } + } +} diff --git a/cloog-core/test/lux.c b/cloog-core/test/lux.c new file mode 100644 index 0000000..d313e3a --- /dev/null +++ b/cloog-core/test/lux.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/lux.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +if (M >= 2) { + for (l=2;l<=M;l++) { + S1(1,1,M,l) ; + } + for (i=2;i<=M-1;i++) { + for (j=1;j<=i-1;j++) { + for (k=j+1;k<=M;k++) { + S2(i,j,k,k,i) ; + } + } + for (l=i+1;l<=M;l++) { + S1(i,i,M,l) ; + } + } + for (j=1;j<=M-1;j++) { + for (k=j+1;k<=M;k++) { + S2(M,j,k,k,M) ; + } + } +} diff --git a/cloog-core/test/lux.cloog b/cloog-core/test/lux.cloog new file mode 100644 index 0000000..1687e32 --- /dev/null +++ b/cloog-core/test/lux.cloog @@ -0,0 +1,36 @@ +# language: C +c + +# parameter n +1 3 +1 0 1 +0 + +2 # Number of statements + +1 +# {c1, c2, i, j | c1=i, c2=n, 1<=i<=n; i+1<=j<=n} +6 7 +0 1 -1 0 0 0 0 +0 0 0 1 0 -1 0 +1 0 1 0 0 0 -1 +1 0 -1 0 0 1 0 +1 0 -1 0 1 0 -1 +1 0 0 0 -1 1 0 +0 0 0 + +1 +# {c1, c2, i, j, k | c1=k, c2=j, 1<=i<=n; i+1<=j<=n i+1<=k<=n} +8 8 +0 1 0 0 0 -1 0 0 +0 0 0 -1 1 0 0 0 +1 0 1 0 0 0 0 -1 +1 0 -1 0 0 0 1 0 +1 0 -1 1 0 0 0 -1 +1 0 0 -1 0 0 1 0 +1 0 -1 0 0 1 0 -1 +1 0 0 0 0 -1 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/lux.good.c b/cloog-core/test/lux.good.c new file mode 100644 index 0000000..e30289c --- /dev/null +++ b/cloog-core/test/lux.good.c @@ -0,0 +1,39 @@ +/* Generated from ../../../git/cloog/test/lux.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } +#define S2(i,j,k,l,m) { hash(2); hash(i); hash(j); hash(k); hash(l); hash(m); } + +void test(int M) +{ + /* Original iterators. */ + int i, j, k, l, m; + if (M >= 2) { + for (l=2;l<=M;l++) { + S1(1,1,M,l) ; + } + } + for (i=2;i<=M-1;i++) { + for (j=1;j<=i-1;j++) { + for (k=j+1;k<=M;k++) { + S2(i,j,k,k,i) ; + } + } + for (l=i+1;l<=M;l++) { + S1(i,i,M,l) ; + } + } + if (M >= 2) { + for (j=1;j<=M-1;j++) { + for (k=j+1;k<=M;k++) { + S2(M,j,k,k,M) ; + } + } + } +} diff --git a/cloog-core/test/merge.c b/cloog-core/test/merge.c new file mode 100644 index 0000000..b85ca1c --- /dev/null +++ b/cloog-core/test/merge.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/merge.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.00s. */ +S1(0); +for (c1=0;c1<=10;c1++) { + if (c1 >= 2) { + S2(c1); + } + S3(c1); +} diff --git a/cloog-core/test/merge.cloog b/cloog-core/test/merge.cloog new file mode 100644 index 0000000..d98c1d0 --- /dev/null +++ b/cloog-core/test/merge.cloog @@ -0,0 +1,42 @@ +c + +0 2 + +0 + +3 + +1 +1 3 +0 -1 0 +0 0 0 + +1 +2 3 +1 1 -2 +1 -1 10 +0 0 0 + +1 +2 3 +1 1 0 +1 -1 10 +0 0 0 + +0 + +3 + +2 5 +0 1 0 -1 0 +0 0 1 0 0 + +2 5 +0 1 0 -1 0 +0 0 1 0 -1 + +2 5 +0 1 0 -1 0 +0 0 1 0 -2 + +0 diff --git a/cloog-core/test/merge.good.c b/cloog-core/test/merge.good.c new file mode 100644 index 0000000..283dc4b --- /dev/null +++ b/cloog-core/test/merge.good.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/merge.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } +#define S3(i) { hash(3); hash(i); } + +void test() +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i; + for (c1=0;c1<=10;c1++) { + if (c1 == 0) { + S1(0) ; + } + if (c1 >= 2) { + S2(c1) ; + } + S3(c1) ; + } +} diff --git a/cloog-core/test/min-1-1.c b/cloog-core/test/min-1-1.c new file mode 100644 index 0000000..896fea0 --- /dev/null +++ b/cloog-core/test/min-1-1.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/min-1-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if ((M >= 0) && (N >= 1)) { + for (i=1;i<=N;i++) { + for (j=0;j<=min(min(M,i),-i+N);j++) { + S1(i,j) ; + } + } +} diff --git a/cloog-core/test/min-1-1.cloog b/cloog-core/test/min-1-1.cloog new file mode 100644 index 0000000..a15cdbd --- /dev/null +++ b/cloog-core/test/min-1-1.cloog @@ -0,0 +1,27 @@ +# language: C +c + +# Context +# {M,N | 1>=0} +1 4 +# M N 1 +1 0 0 1 +0 + +1 # Number of statements + +1 +# {i,j |1<=i<=N; 0<=j<=M; j<=i; j+i<=N}, i.e. +# {i,j | (1,j)<=i<=-j+N; 0<=j<=M} +6 6 +# i j M N 1 +1 1 0 0 0 -1 +1 0 1 0 0 0 +1 0 -1 1 0 0 +1 1 -1 0 0 0 +1 -1 -1 0 1 0 +1 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/min-1-1.good.c b/cloog-core/test/min-1-1.good.c new file mode 100644 index 0000000..ff0d5fc --- /dev/null +++ b/cloog-core/test/min-1-1.good.c @@ -0,0 +1,23 @@ +/* Generated from ../../../git/cloog/test/min-1-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + if (M >= 0) { + for (i=1;i<=N;i++) { + for (j=0;j<=min(min(i,-i+N),M);j++) { + S1(i,j) ; + } + } + } +} diff --git a/cloog-core/test/min-2-1.c b/cloog-core/test/min-2-1.c new file mode 100644 index 0000000..f7161bc --- /dev/null +++ b/cloog-core/test/min-2-1.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/min-2-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if ((M >= 0) && (N >= 1)) { + for (i=1;i<=N;i++) { + for (j=0;j<=min(min(M,i),-i+N);j++) { + for (k=0;k<=min(min(M,i),-i+N);k++) { + S1(i,j,k) ; + } + } + } +} diff --git a/cloog-core/test/min-2-1.cloog b/cloog-core/test/min-2-1.cloog new file mode 100644 index 0000000..0c1ed37 --- /dev/null +++ b/cloog-core/test/min-2-1.cloog @@ -0,0 +1,31 @@ +# language: C +c + +# Context +# {M,N | 1>=0} +1 4 +# M N 1 +1 0 0 1 +0 + +1 # Number of statements + +1 +# {i,j |1<=i<=N; 0<=j<=M; j<=i; j+i<=N}, i.e. +# {i,j | (1,j)<=i<=-j+N; 0<=j<=M} +10 7 +# i j k M N 1 +1 1 0 0 0 0 -1 +1 0 1 0 0 0 0 +1 0 -1 0 1 0 0 +1 1 -1 0 0 0 0 +1 -1 -1 0 0 1 0 +1 0 0 1 0 0 0 +1 0 0 -1 1 0 0 +1 1 0 -1 0 0 0 +1 -1 0 -1 0 1 0 +1 0 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/min-2-1.good.c b/cloog-core/test/min-2-1.good.c new file mode 100644 index 0000000..e052a0c --- /dev/null +++ b/cloog-core/test/min-2-1.good.c @@ -0,0 +1,25 @@ +/* Generated from ../../../git/cloog/test/min-2-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j, k; + if (M >= 0) { + for (i=1;i<=N;i++) { + for (j=0;j<=min(min(i,M),-i+N);j++) { + for (k=0;k<=min(min(M,i),-i+N);k++) { + S1(i,j,k) ; + } + } + } + } +} diff --git a/cloog-core/test/min-3-1.c b/cloog-core/test/min-3-1.c new file mode 100644 index 0000000..5736a3c --- /dev/null +++ b/cloog-core/test/min-3-1.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/min-3-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (i=0;i<=min(10,M);i++) { + for (j=0;j<=min(10,M);j++) { + S1(i,j) ; + } +} diff --git a/cloog-core/test/min-3-1.cloog b/cloog-core/test/min-3-1.cloog new file mode 100644 index 0000000..f1a3c12 --- /dev/null +++ b/cloog-core/test/min-3-1.cloog @@ -0,0 +1,27 @@ +# language: C +c + +# Context +2 3 +# M 1 +1 1 0 +1 0 1 +0 + +1 # Number of statements + +1 +# +7 5 +# i j M 1 +1 1 0 0 0 +1 -1 0 1 0 +1 -1 0 0 10 +1 0 1 0 0 +1 0 -1 1 0 +1 0 -1 0 10 +1 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/min-3-1.good.c b/cloog-core/test/min-3-1.good.c new file mode 100644 index 0000000..ec50b38 --- /dev/null +++ b/cloog-core/test/min-3-1.good.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/min-3-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + for (i=0;i<=min(10,M);i++) { + for (j=0;j<=min(10,M);j++) { + S1(i,j) ; + } + } +} diff --git a/cloog-core/test/min-4-1.c b/cloog-core/test/min-4-1.c new file mode 100644 index 0000000..91e5e65 --- /dev/null +++ b/cloog-core/test/min-4-1.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/min-4-1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if ((M >= -N) && (M >= -O) && (N >= 0) && (N >= -O)) { + for (i=max(-M,-N);i<=min(N,O);i++) { + S1(i) ; + } +} diff --git a/cloog-core/test/min-4-1.cloog b/cloog-core/test/min-4-1.cloog new file mode 100644 index 0000000..5cce62f --- /dev/null +++ b/cloog-core/test/min-4-1.cloog @@ -0,0 +1,25 @@ +# language: C +c + +# Context +# {L,M,N|} +1 5 +# L M N 1 +1 0 0 0 1 +0 + +1 # Number of statements + +1 +# {i|-L,-M <= i <= M, N} +5 6 +# i L M N 1 +1 1 1 0 0 0 +1 1 0 1 0 0 +1 -1 0 1 0 0 +1 -1 0 0 1 0 +1 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/min-4-1.good.c b/cloog-core/test/min-4-1.good.c new file mode 100644 index 0000000..a04831f --- /dev/null +++ b/cloog-core/test/min-4-1.good.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/min-4-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } + +void test(int M, int N, int O) +{ + /* Original iterators. */ + int i; + for (i=max(-M,-N);i<=min(O,N);i++) { + S1(i) ; + } +} diff --git a/cloog-core/test/mod4.c b/cloog-core/test/mod4.c new file mode 100644 index 0000000..6a1ad6a --- /dev/null +++ b/cloog-core/test/mod4.c @@ -0,0 +1,6 @@ +/* Generated from /home/skimo/git/cloog/test/mod4.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.00s. */ +for (j=2;j<=10;j+=3) { + S1(j,(j+1)/3,(j+1)/3,2,(j-2)/3); + S2(j,(j+1)/3,(j+1)/3,2,(j-2)/3); + S3(j,(j+1)/3,(j+1)/3,2,(j-2)/3); +} diff --git a/cloog-core/test/mod4.cloog b/cloog-core/test/mod4.cloog new file mode 100644 index 0000000..6f3eecd --- /dev/null +++ b/cloog-core/test/mod4.cloog @@ -0,0 +1,72 @@ +# language: C +c + +# parameters +1 2 +1 1 + 0 + + +3 + + + +# S1: ND_4IP_3 +1 +11 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 0 0 10 + 0 0 0 0 1 0 -2 + 1 -1 0 0 0 3 2 + 1 -1 0 0 0 3 2 + 1 1 0 0 0 -3 0 + 0 1 0 0 -1 -3 0 + 1 1 -3 0 0 0 2 + 1 -1 3 0 0 0 0 + 1 1 0 -3 0 0 1 + 1 -1 0 3 0 0 1 + 0 0 0 + + + +# S2: W:ND_4OP_1 +1 +13 7 + 1 0 1 0 0 -1 -1 + 1 0 0 3 0 -3 -2 + 1 1 0 0 0 0 -1 + 1 -1 0 0 0 0 10 + 0 0 0 0 1 0 -2 + 1 -1 0 0 0 3 2 + 1 -1 0 0 0 3 2 + 1 1 0 0 0 -3 0 + 0 1 0 0 -1 -3 0 + 1 1 -3 0 0 0 2 + 1 -1 3 0 0 0 0 + 1 1 0 -3 0 0 1 + 1 -1 0 3 0 0 1 + 0 0 0 + + + +# S3: ND_4 +1 +11 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 0 0 10 + 0 0 0 0 1 0 -2 + 1 -1 0 0 0 3 2 + 1 -1 0 0 0 3 2 + 1 1 0 0 0 -3 0 + 0 1 0 0 -1 -3 0 + 1 1 -3 0 0 0 2 + 1 -1 3 0 0 0 0 + 1 1 0 -3 0 0 1 + 1 -1 0 3 0 0 1 + 0 0 0 + + + 1 + j div41 div42 mod6 mod6_a + 0 + 0 diff --git a/cloog-core/test/mode.c b/cloog-core/test/mode.c new file mode 100644 index 0000000..c527eed --- /dev/null +++ b/cloog-core/test/mode.c @@ -0,0 +1,24 @@ +/* Generated from /home/skimo/git/cloog/test/mode.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ +if (M >= 0) { + if (N >= 0) { + for (i=0;i<=M;i++) { + for (j=0;j<=min(N,i);j++) { + S1(i,j); + S2(i,j); + } + for (j=N+1;j<=i;j++) { + S1(i,j); + } + for (j=i+1;j<=N;j++) { + S2(i,j); + } + } + } + if (N <= -1) { + for (i=0;i<=M;i++) { + for (j=0;j<=i;j++) { + S1(i,j); + } + } + } +} diff --git a/cloog-core/test/mode.cloog b/cloog-core/test/mode.cloog new file mode 100644 index 0000000..caeecb8 --- /dev/null +++ b/cloog-core/test/mode.cloog @@ -0,0 +1,33 @@ +# language: C +c + +# parameters n m +1 4 +# n m 1 +1 0 0 1 +0 + +2 # Number of statements + +1 +# S2 {i, j | 0<=i<=n; 0<=j<=i} +4 6 +# i j n m 1 +1 1 0 0 0 0 +1 -1 0 1 0 0 +1 0 1 0 0 0 +1 1 -1 0 0 0 +0 0 0 + +1 +# S2 {i, j | 0<=i<=n; 0<=j<=m} +4 6 +# i j n m 1 +1 1 0 0 0 0 +1 -1 0 1 0 0 +1 0 1 0 0 0 +1 0 -1 0 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/mode.good.c b/cloog-core/test/mode.good.c new file mode 100644 index 0000000..0714757 --- /dev/null +++ b/cloog-core/test/mode.good.c @@ -0,0 +1,50 @@ +/* Generated from ../../../git/cloog/test/mode.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + for (i=0;i<=min(M,N-1);i++) { + for (j=0;j<=i;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=i+1;j<=N;j++) { + S2(i,j) ; + } + } + if ((M >= N) && (N >= 0)) { + for (j=0;j<=N;j++) { + S1(N,j) ; + S2(N,j) ; + } + } + if (N >= 0) { + for (i=N+1;i<=M;i++) { + for (j=0;j<=N;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=N+1;j<=i;j++) { + S1(i,j) ; + } + } + } + if (N <= -1) { + for (i=0;i<=M;i++) { + for (j=0;j<=i;j++) { + S1(i,j) ; + } + } + } +} diff --git a/cloog-core/test/multi-mm-1.c b/cloog-core/test/multi-mm-1.c new file mode 100644 index 0000000..646395c --- /dev/null +++ b/cloog-core/test/multi-mm-1.c @@ -0,0 +1,10 @@ +/* Generated from /home/skimo/git/cloog/test/multi-mm-1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ +for (i=0;i<=M;i++) { + for (j=0;j<=min(N,i);j++) { + S1(i,j); + S2(i,j); + } + for (j=N+1;j<=i;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/multi-mm-1.cloog b/cloog-core/test/multi-mm-1.cloog new file mode 100644 index 0000000..58f4ce8 --- /dev/null +++ b/cloog-core/test/multi-mm-1.cloog @@ -0,0 +1,37 @@ +# language: C +c + +# Context +#{M,N|M>N} +3 4 +# M N 1 +1 1 -1 0 +1 0 1 -1 +1 0 0 1 +0 + +2 # Number of statements + +1 +# +4 6 +# i j M N 1 +1 0 1 0 0 0 +1 1 -1 0 0 0 +1 -1 0 1 0 0 +1 0 0 0 0 1 +0 0 0 + +1 +# +5 6 +# i j M N 1 +1 0 1 0 0 0 +1 1 -1 0 0 0 +1 -1 0 1 0 0 +1 0 -1 0 1 0 +1 0 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/multi-mm-1.good.c b/cloog-core/test/multi-mm-1.good.c new file mode 100644 index 0000000..6bfcc3c --- /dev/null +++ b/cloog-core/test/multi-mm-1.good.c @@ -0,0 +1,32 @@ +/* Generated from ../../../git/cloog/test/multi-mm-1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + for (i=0;i<=N;i++) { + for (j=0;j<=i;j++) { + S1(i,j) ; + S2(i,j) ; + } + } + for (i=N+1;i<=M;i++) { + for (j=0;j<=N;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=N+1;j<=i;j++) { + S1(i,j) ; + } + } +} diff --git a/cloog-core/test/multi-stride.c b/cloog-core/test/multi-stride.c new file mode 100644 index 0000000..51b2061 --- /dev/null +++ b/cloog-core/test/multi-stride.c @@ -0,0 +1 @@ +/* Generated from ../../../git/cloog/test/multi-stride.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ diff --git a/cloog-core/test/multi-stride.cloog b/cloog-core/test/multi-stride.cloog new file mode 100644 index 0000000..8f858da --- /dev/null +++ b/cloog-core/test/multi-stride.cloog @@ -0,0 +1,28 @@ +# Language +c + +# Context + + 1 2 + 1 1 +0 + +# Number of statements +1 + +1 + +# i' i j 1 + 4 5 + 0 1 -2 0 -1 + 0 1 0 -6 -2 + 1 1 0 0 0 + 1 -1 0 0 100 + +0 0 0 + +0 +0 + + + diff --git a/cloog-core/test/multi-stride2.c b/cloog-core/test/multi-stride2.c new file mode 100644 index 0000000..443107b --- /dev/null +++ b/cloog-core/test/multi-stride2.c @@ -0,0 +1,4 @@ +/* Generated from ../../../git/cloog/test/multi-stride2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +for (i=5;i<=100;i+=6) { + S1(i,(i-1)/2,(i-2)/3) ; +} diff --git a/cloog-core/test/multi-stride2.cloog b/cloog-core/test/multi-stride2.cloog new file mode 100644 index 0000000..db1afd4 --- /dev/null +++ b/cloog-core/test/multi-stride2.cloog @@ -0,0 +1,28 @@ +# Language +c + +# Context + + 1 2 + 1 1 +0 + +# Number of statements +1 + +1 + +# i' i j 1 + 4 5 + 0 1 -2 0 -1 + 0 1 0 -3 -2 + 1 1 0 0 0 + 1 -1 0 0 100 + +0 0 0 + +0 +0 + + + diff --git a/cloog-core/test/no_lindep.c b/cloog-core/test/no_lindep.c new file mode 100644 index 0000000..3c7c574 --- /dev/null +++ b/cloog-core/test/no_lindep.c @@ -0,0 +1,2 @@ +/* Generated from ../../../git/cloog/test/no_lindep.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +S1(N+2) ; diff --git a/cloog-core/test/no_lindep.cloog b/cloog-core/test/no_lindep.cloog new file mode 100644 index 0000000..ab0cb7d --- /dev/null +++ b/cloog-core/test/no_lindep.cloog @@ -0,0 +1,34 @@ +# language C +c + +# 2 parameters +1 4 +1 0 0 0 + +0 + +# 1 statement +1 + +# 1 domain +# i=n+2 +1 +1 5 +0 -1 0 1 2 + +0 0 0 + +0 + +# 1 scattering function +# c1=M+1 +# c2=N +1 +2 7 +0 -1 0 0 1 0 1 +0 0 -1 0 0 1 0 + +0 + + + diff --git a/cloog-core/test/no_lindep.good.c b/cloog-core/test/no_lindep.good.c new file mode 100644 index 0000000..5db6759 --- /dev/null +++ b/cloog-core/test/no_lindep.good.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/no_lindep.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i; + c1 = M+1 ; + i = N+2 ; + S1(N+2) ; +} diff --git a/cloog-core/test/non_optimal/nul_complex1.c b/cloog-core/test/non_optimal/nul_complex1.c new file mode 100644 index 0000000..ff78145 --- /dev/null +++ b/cloog-core/test/non_optimal/nul_complex1.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/./non_optimal/nul_complex1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (n >= 0) { + for (c1=0;c1<=5*n;c1++) { + for (c2=max(ceild(2*c1,3),c1-n);c2<=min(floord(2*c1+2*n,3),c1);c2++) { + if (c2%2 == 0) { + S1((-2*c1+3*c2)/2,c1-c2) ; + } + } + } +} diff --git a/cloog-core/test/non_optimal/nul_complex1.cloog b/cloog-core/test/non_optimal/nul_complex1.cloog new file mode 100644 index 0000000..4b4d45a --- /dev/null +++ b/cloog-core/test/non_optimal/nul_complex1.cloog @@ -0,0 +1,37 @@ +# Optimal code is in fact : +# +# for (i=0;i<=M;i+=2) { +# S1 ; +# } + +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +1 +n + +1 # Number of statements + +1 +# {i | 0<=i<=n} +4 5 +# i j n 1 +1 1 0 0 0 +1 -1 0 1 0 +1 0 1 0 0 +1 0 -1 1 0 +0 0 0 +0 + +1 # Scattering functions + +2 7 +# c1 c2 i j n 1 +0 1 0 -2 -3 0 0 +0 0 1 -2 -2 0 0 + +0 diff --git a/cloog-core/test/non_optimal/nul_complex1.good.c b/cloog-core/test/non_optimal/nul_complex1.good.c new file mode 100644 index 0000000..79694f1 --- /dev/null +++ b/cloog-core/test/non_optimal/nul_complex1.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/./non_optimal/nul_complex1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int n) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j; + for (c1=0;c1<=5*n;c1++) { + for (c2=max(c1-n,ceild(2*c1,3));c2<=min(c1,floord(2*c1+2*n,3));c2++) { + if (c2%2 == 0) { + i = (-2*c1+3*c2)/2 ; + j = c1-c2 ; + S1((-2*c1+3*c2)/2,c1-c2) ; + } + } + } +} diff --git a/cloog-core/test/non_optimal/usvd_e_t.c b/cloog-core/test/non_optimal/usvd_e_t.c new file mode 100644 index 0000000..6d253f6 --- /dev/null +++ b/cloog-core/test/non_optimal/usvd_e_t.c @@ -0,0 +1,375 @@ +/* Generated from ../../../git/cloog/test/non_optimal/usvd_e_t.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.11s. */ +for (i=0;i<=2;i++) { + S1(i,0,0); + for (j=0;j<=4;j++) { + S2(i,j,0); + } +} +S1(3,0,0); +for (j=0;j<=4;j++) { + S2(3,j,0); +} +for (j=7;j<=11;j++) { + S8(3,j,0); +} +S1(4,0,0); +S2(4,0,0); +S3(4,0,0); +S5(4,0,0); +for (j=1;j<=4;j++) { + S2(4,j,0); + S5(4,j,0); +} +for (j=7;j<=11;j++) { + S8(4,j,0); +} +for (i=5;i<=6;i++) { + for (j=-4;j<=i-9;j++) { + S6(i,j,0); + } + for (j=i-9;j<=-1;j++) { + S7(i,j,0); + } + S3(i,0,0); + S7(i,0,0); + for (j=1;j<=i-4;j++) { + S4(i,j,-1); + } + for (j=i-4;j<=4;j++) { + S5(i,j,0); + } + for (j=7;j<=11;j++) { + S8(i,j,0); + } +} +for (j=-4;j<=-2;j++) { + S6(7,j,0); +} +for (j=-2;j<=-1;j++) { + S7(7,j,0); +} +S3(7,0,0); +S7(7,0,0); +for (j=1;j<=3;j++) { + S4(7,j,-1); +} +for (j=3;j<=4;j++) { + S5(7,j,0); +} +S9(7,4,0); +S10(7,4,0); +S11(7,4,0); +S21(7,4,0); +S23(7,4,0); +S11(7,4,1); +S16(7,4,1); +S17(7,4,1); +for (k=2;k<=4;k++) { + S11(7,4,k); +} +S12(7,5,0); +S21(7,5,0); +S22(7,5,0); +S23(7,5,0); +S12(7,5,1); +S16(7,5,1); +S17(7,5,1); +for (k=2;k<=4;k++) { + S12(7,5,k); +} +S21(7,6,0); +S22(7,6,0); +S23(7,6,0); +for (j=7;j<=8;j++) { + S8(7,j,0); + S21(7,j,0); + S22(7,j,0); + S23(7,j,0); +} +S8(7,9,0); +S22(7,9,0); +for (j=10;j<=11;j++) { + S8(7,j,0); +} +for (j=-4;j<=-1;j++) { + S6(8,j,0); +} +S7(8,-1,0); +S3(8,0,0); +S7(8,0,0); +S19(8,1,-2); +S4(8,1,-1); +S19(8,1,-1); +S19(8,1,0); +S15(8,1,4); +S18(8,1,4); +for (k=-4;k<=-3;k++) { + S14(8,2,k); + S20(8,2,k); +} +S14(8,2,-2); +S19(8,2,-2); +S20(8,2,-2); +S4(8,2,-1); +S14(8,2,-1); +S19(8,2,-1); +S20(8,2,-1); +S14(8,2,0); +S19(8,2,0); +S20(8,2,0); +S15(8,2,4); +S18(8,2,4); +for (k=-4;k<=-2;k++) { + S14(8,3,k); + S20(8,3,k); +} +S4(8,3,-1); +S14(8,3,-1); +S20(8,3,-1); +S14(8,3,0); +S20(8,3,0); +S15(8,3,4); +S18(8,3,4); +for (k=-4;k<=-2;k++) { + S14(8,4,k); + S20(8,4,k); +} +S4(8,4,-1); +S14(8,4,-1); +S20(8,4,-1); +S5(8,4,0); +S9(8,4,0); +S10(8,4,0); +S14(8,4,0); +S20(8,4,0); +S23(8,4,0); +S13(8,4,1); +S21(8,4,1); +S23(8,4,1); +S24(8,4,1); +S13(8,4,2); +S16(8,4,2); +S17(8,4,2); +S24(8,4,2); +S13(8,4,3); +S24(8,4,3); +S13(8,4,4); +S15(8,4,4); +S23(8,5,0); +S11(8,5,1); +S21(8,5,1); +S22(8,5,1); +S23(8,5,1); +S24(8,5,1); +S11(8,5,2); +S16(8,5,2); +S17(8,5,2); +S24(8,5,2); +S11(8,5,3); +S24(8,5,3); +S11(8,5,4); +S15(8,5,4); +S23(8,6,0); +S12(8,6,1); +S21(8,6,1); +S22(8,6,1); +S23(8,6,1); +S24(8,6,1); +S12(8,6,2); +S16(8,6,2); +S17(8,6,2); +S24(8,6,2); +S12(8,6,3); +S24(8,6,3); +S12(8,6,4); +for (j=7;j<=8;j++) { + S23(8,j,0); + S21(8,j,1); + S22(8,j,1); + S23(8,j,1); + for (k=1;k<=3;k++) { + S24(8,j,k); + } +} +S22(8,9,1); +S7(9,0,0); +for (j=1;j<=2;j++) { + for (k=-1;k<=0;k++) { + S19(9,j,k); + } + for (k=4;k<=5;k++) { + S15(9,j,k); + S18(9,j,k); + } +} +S20(9,3,-4); +for (k=-3;k<=-2;k++) { + S14(9,3,k); + S20(9,3,k); +} +for (k=-1;k<=0;k++) { + S14(9,3,k); + S19(9,3,k); + S20(9,3,k); +} +for (k=4;k<=5;k++) { + S15(9,3,k); + S18(9,3,k); +} +S20(9,4,-4); +for (k=-3;k<=-1;k++) { + S14(9,4,k); + S20(9,4,k); +} +S9(9,4,0); +S10(9,4,0); +S14(9,4,0); +S20(9,4,0); +for (k=0;k<=1;k++) { + S23(9,4,k); +} +S13(9,4,2); +S21(9,4,2); +S23(9,4,2); +S24(9,4,2); +S13(9,4,3); +S16(9,4,3); +S17(9,4,3); +S24(9,4,3); +S13(9,4,4); +for (k=4;k<=5;k++) { + S15(9,4,k); + S18(9,4,k); +} +for (k=0;k<=1;k++) { + S23(9,5,k); +} +S13(9,5,2); +S21(9,5,2); +S22(9,5,2); +S23(9,5,2); +S24(9,5,2); +S13(9,5,3); +S16(9,5,3); +S17(9,5,3); +S24(9,5,3); +S13(9,5,4); +for (k=4;k<=5;k++) { + S15(9,5,k); +} +for (k=0;k<=1;k++) { + S23(9,6,k); +} +S11(9,6,2); +S21(9,6,2); +S22(9,6,2); +S23(9,6,2); +S24(9,6,2); +S11(9,6,3); +S16(9,6,3); +S17(9,6,3); +S24(9,6,3); +S11(9,6,4); +for (k=0;k<=1;k++) { + S23(9,7,k); +} +S12(9,7,2); +S21(9,7,2); +S22(9,7,2); +S23(9,7,2); +S24(9,7,2); +S12(9,7,3); +S16(9,7,3); +S17(9,7,3); +S24(9,7,3); +S12(9,7,4); +for (k=0;k<=1;k++) { + S23(9,8,k); +} +S21(9,8,2); +S22(9,8,2); +S23(9,8,2); +for (k=2;k<=3;k++) { + S24(9,8,k); +} +S22(9,9,2); +for (j=1;j<=3;j++) { + S19(10,j,0); + S26(10,j,3); + S15(10,j,4); + S18(10,j,4); + S25(10,j,4); + for (k=5;k<=6;k++) { + S15(10,j,k); + S18(10,j,k); + } +} +for (k=-4;k<=-3;k++) { + S20(10,4,k); +} +for (k=-2;k<=-1;k++) { + S14(10,4,k); + S20(10,4,k); +} +S9(10,4,0); +S10(10,4,0); +S14(10,4,0); +S19(10,4,0); +S20(10,4,0); +S13(10,4,3); +S21(10,4,3); +S24(10,4,3); +S26(10,4,3); +S13(10,4,4); +S15(10,4,4); +S16(10,4,4); +S17(10,4,4); +S18(10,4,4); +S25(10,4,4); +for (k=5;k<=6;k++) { + S15(10,4,k); + S18(10,4,k); +} +S13(10,5,3); +S21(10,5,3); +S22(10,5,3); +S24(10,5,3); +S26(10,5,3); +S13(10,5,4); +S15(10,5,4); +S16(10,5,4); +S17(10,5,4); +S18(10,5,4); +S25(10,5,4); +for (k=5;k<=6;k++) { + S15(10,5,k); + S18(10,5,k); +} +S13(10,6,3); +S21(10,6,3); +S22(10,6,3); +S24(10,6,3); +S13(10,6,4); +S16(10,6,4); +S17(10,6,4); +S11(10,7,3); +S21(10,7,3); +S22(10,7,3); +S24(10,7,3); +S11(10,7,4); +S16(10,7,4); +S17(10,7,4); +S12(10,8,3); +S21(10,8,3); +S22(10,8,3); +S24(10,8,3); +S12(10,8,4); +S16(10,8,4); +S17(10,8,4); +S22(10,9,3); +for (i=11;i<=14;i++) { + for (j=1;j<=5;j++) { + S26(i,j,3); + S25(i,j,4); + } +} diff --git a/cloog-core/test/non_optimal/usvd_e_t.cloog b/cloog-core/test/non_optimal/usvd_e_t.cloog new file mode 100644 index 0000000..a8d8510 --- /dev/null +++ b/cloog-core/test/non_optimal/usvd_e_t.cloog @@ -0,0 +1,240 @@ +# language: C +c + +# Context +0 2 + +0 # parameter names + +26 # Number of statements + +1 +4 5 +# i j k 1 + 0 0 1 0 0 + 0 0 0 1 0 + 1 1 0 0 0 + 1 -1 0 0 4 +0 0 0 +1 +5 5 +# i j k 1 + 0 0 0 1 0 + 1 1 0 0 0 + 1 -1 0 0 4 + 1 0 1 0 0 + 1 0 -1 0 4 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 1 0 0 + 0 0 0 1 0 + 1 1 0 0 -4 + 1 -1 0 0 8 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 0 1 1 + 1 -1 0 0 8 + 1 0 1 0 -1 + 1 1 -1 0 -4 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 0 1 0 + 1 1 0 0 -4 + 1 0 -1 0 4 + 1 -1 1 0 4 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 0 1 0 + 1 -1 0 0 8 + 1 0 1 0 4 + 1 1 -1 0 -9 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 0 1 0 + 1 1 0 0 -5 + 1 0 -1 0 0 + 1 -1 1 0 9 +0 0 0 +1 +5 5 +# i j k 1 + 0 0 0 1 0 + 1 1 0 0 -3 + 1 -1 0 0 7 + 1 0 1 0 -7 + 1 0 -1 0 11 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 1 0 -4 + 0 0 0 1 0 + 1 1 0 0 -7 + 1 -1 0 0 10 +0 0 0 +1 +4 5 +# i j k 1 + 0 0 1 0 -4 + 0 0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+# i j k 1 + 0 1 0 -1 -7 + 1 0 0 1 0 + 1 0 1 0 -5 + 1 0 -1 0 9 + 1 0 0 -1 3 +0 0 0 +1 +5 5 +# i j k 1 + 1 -1 0 0 9 + 1 0 1 0 -4 + 1 0 -1 0 8 + 1 0 0 1 0 + 1 1 0 -1 -7 +0 0 0 +1 +5 5 +# i j k 1 + 1 1 0 0 -8 + 1 0 1 0 -4 + 1 0 -1 0 8 + 1 0 0 -1 3 + 1 -1 0 1 7 +0 0 0 +1 +5 5 +# i j k 1 + 0 0 0 1 -4 + 1 1 0 0 -10 + 1 -1 0 0 14 + 1 0 1 0 -1 + 1 0 -1 0 5 +0 0 0 +1 +5 5 +# i j k 1 + 0 0 0 1 -3 + 1 1 0 0 -10 + 1 -1 0 0 14 + 1 0 1 0 -1 + 1 0 -1 0 5 +0 0 0 +0 # iterator names +0 # scattering functions +0 # scattering dimension names + diff --git a/cloog-core/test/non_optimal/usvd_e_t.good.c b/cloog-core/test/non_optimal/usvd_e_t.good.c new file mode 100644 index 0000000..f54c11c --- /dev/null +++ b/cloog-core/test/non_optimal/usvd_e_t.good.c @@ -0,0 +1,429 @@ +/* Generated from ../../../git/cloog/test/./non_optimal/usvd_e_t.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.36s. */ +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); } +#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } +#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } +#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } +#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } +#define S10(i,j,k) { hash(10); hash(i); hash(j); hash(k); } +#define S11(i,j,k) { hash(11); hash(i); hash(j); hash(k); } +#define S12(i,j,k) { hash(12); hash(i); hash(j); hash(k); } +#define S13(i,j,k) { hash(13); hash(i); hash(j); hash(k); } +#define S14(i,j,k) { hash(14); hash(i); hash(j); hash(k); } +#define S15(i,j,k) { hash(15); hash(i); hash(j); hash(k); } +#define S16(i,j,k) { hash(16); hash(i); hash(j); hash(k); } +#define S17(i,j,k) { hash(17); hash(i); hash(j); hash(k); } +#define S18(i,j,k) { hash(18); hash(i); hash(j); hash(k); } +#define S19(i,j,k) { hash(19); hash(i); hash(j); hash(k); } +#define S20(i,j,k) { hash(20); hash(i); hash(j); hash(k); } +#define S21(i,j,k) { hash(21); hash(i); hash(j); hash(k); } +#define S22(i,j,k) { hash(22); hash(i); hash(j); hash(k); } +#define S23(i,j,k) { hash(23); hash(i); hash(j); hash(k); } +#define S24(i,j,k) { hash(24); hash(i); hash(j); hash(k); } +#define S25(i,j,k) { hash(25); hash(i); hash(j); hash(k); } +#define S26(i,j,k) { hash(26); hash(i); hash(j); hash(k); } + +void test() +{ + /* Original iterators. */ + int i, j, k; + for (i=0;i<=2;i++) { + S1(i,0,0) ; + S2(i,0,0) ; + for (j=1;j<=4;j++) { + S2(i,j,0) ; + } + } + S1(3,0,0) ; + S2(3,0,0) ; + for (j=1;j<=4;j++) { + S2(3,j,0) ; + } + for (j=7;j<=11;j++) { + S8(3,j,0) ; + } + S1(4,0,0) ; + S2(4,0,0) ; + S3(4,0,0) ; + S5(4,0,0) ; + for (j=1;j<=4;j++) { + S2(4,j,0) ; + S5(4,j,0) ; + } + for (j=7;j<=11;j++) { + S8(4,j,0) ; + } + S6(5,-4,0) ; + S7(5,-4,0) ; + for (j=-3;j<=-1;j++) { + S7(5,j,0) ; + } + S3(5,0,0) ; + S7(5,0,0) ; + S4(5,1,-1) ; + S5(5,1,0) ; + for (j=2;j<=4;j++) { + S5(5,j,0) ; + } + for (j=7;j<=11;j++) { + S8(5,j,0) ; + } + S6(6,-4,0) ; + S6(6,-3,0) ; + S7(6,-3,0) ; + for (j=-2;j<=-1;j++) { + S7(6,j,0) ; + } + S3(6,0,0) ; + S7(6,0,0) ; + S4(6,1,-1) ; + S4(6,2,-1) ; + S5(6,2,0) ; + for (j=3;j<=4;j++) { + S5(6,j,0) ; + } + for (j=7;j<=11;j++) { + S8(6,j,0) ; + } + for (j=-4;j<=-3;j++) { + S6(7,j,0) ; + } + S6(7,-2,0) ; + S7(7,-2,0) ; + S7(7,-1,0) ; + S3(7,0,0) ; + S7(7,0,0) ; + for (j=1;j<=2;j++) { + S4(7,j,-1) ; + } + S4(7,3,-1) ; + S5(7,3,0) ; + S5(7,4,0) ; + S9(7,4,0) ; + S10(7,4,0) ; + S11(7,4,0) ; + S21(7,4,0) ; + S23(7,4,0) ; + S11(7,4,1) ; + S16(7,4,1) ; + S17(7,4,1) ; + for (k=2;k<=4;k++) { + S11(7,4,k) ; + } + S12(7,5,0) ; + S21(7,5,0) ; + S22(7,5,0) ; + S23(7,5,0) ; + S12(7,5,1) ; + S16(7,5,1) ; + S17(7,5,1) ; + for (k=2;k<=4;k++) { + S12(7,5,k) ; + } + S21(7,6,0) ; + S22(7,6,0) ; + S23(7,6,0) ; + for (j=7;j<=8;j++) { + S8(7,j,0) ; + S21(7,j,0) ; + S22(7,j,0) ; + S23(7,j,0) ; + } + S8(7,9,0) ; + S22(7,9,0) ; + for (j=10;j<=11;j++) { + S8(7,j,0) ; + } + for (j=-4;j<=-2;j++) { + S6(8,j,0) ; + } + S6(8,-1,0) ; + S7(8,-1,0) ; + S3(8,0,0) ; + S7(8,0,0) ; + S19(8,1,-2) ; + S4(8,1,-1) ; + S19(8,1,-1) ; + S19(8,1,0) ; + S15(8,1,4) ; + S18(8,1,4) ; + for (k=-4;k<=-3;k++) { + S14(8,2,k) ; + S20(8,2,k) ; + } + S14(8,2,-2) ; + S19(8,2,-2) ; + S20(8,2,-2) ; + S4(8,2,-1) ; + S14(8,2,-1) ; + S19(8,2,-1) ; + S20(8,2,-1) ; + S14(8,2,0) ; + S19(8,2,0) ; + S20(8,2,0) ; + S15(8,2,4) ; + S18(8,2,4) ; + for (k=-4;k<=-2;k++) { + S14(8,3,k) ; + S20(8,3,k) ; + } + S4(8,3,-1) ; + S14(8,3,-1) ; + S20(8,3,-1) ; + S14(8,3,0) ; + S20(8,3,0) ; + S15(8,3,4) ; + S18(8,3,4) ; + for (k=-4;k<=-2;k++) { + S14(8,4,k) ; + S20(8,4,k) ; + } + S4(8,4,-1) ; + S14(8,4,-1) ; + S20(8,4,-1) ; + S5(8,4,0) ; + S9(8,4,0) ; + S10(8,4,0) ; + S14(8,4,0) ; + S20(8,4,0) ; + S23(8,4,0) ; + S13(8,4,1) ; + S21(8,4,1) ; + S23(8,4,1) ; + S24(8,4,1) ; + S13(8,4,2) ; + S16(8,4,2) ; + S17(8,4,2) ; + S24(8,4,2) ; + S13(8,4,3) ; + S24(8,4,3) ; + S13(8,4,4) ; + S15(8,4,4) ; + S23(8,5,0) ; + S11(8,5,1) ; + S21(8,5,1) ; + S22(8,5,1) ; + S23(8,5,1) ; + S24(8,5,1) ; + S11(8,5,2) ; + S16(8,5,2) ; + S17(8,5,2) ; + S24(8,5,2) ; + S11(8,5,3) ; + S24(8,5,3) ; + S11(8,5,4) ; + S15(8,5,4) ; + S23(8,6,0) ; + S12(8,6,1) ; + S21(8,6,1) ; + S22(8,6,1) ; + S23(8,6,1) ; + S24(8,6,1) ; + S12(8,6,2) ; + S16(8,6,2) ; + S17(8,6,2) ; + S24(8,6,2) ; + S12(8,6,3) ; + S24(8,6,3) ; + S12(8,6,4) ; + for (j=7;j<=8;j++) { + S23(8,j,0) ; + S21(8,j,1) ; + S22(8,j,1) ; + S23(8,j,1) ; + S24(8,j,1) ; + for (k=2;k<=3;k++) { + S24(8,j,k) ; + } + } + S22(8,9,1) ; + S7(9,0,0) ; + for (j=1;j<=2;j++) { + for (k=-1;k<=0;k++) { + S19(9,j,k) ; + } + for (k=4;k<=5;k++) { + S15(9,j,k) ; + S18(9,j,k) ; + } + } + S20(9,3,-4) ; + for (k=-3;k<=-2;k++) { + S14(9,3,k) ; + S20(9,3,k) ; + } + for (k=-1;k<=0;k++) { + S14(9,3,k) ; + S19(9,3,k) ; + S20(9,3,k) ; + } + for (k=4;k<=5;k++) { + S15(9,3,k) ; + S18(9,3,k) ; + } + S20(9,4,-4) ; + for (k=-3;k<=-1;k++) { + S14(9,4,k) ; + S20(9,4,k) ; + } + S9(9,4,0) ; + S10(9,4,0) ; + S14(9,4,0) ; + S20(9,4,0) ; + S23(9,4,0) ; + S23(9,4,1) ; + S13(9,4,2) ; + S21(9,4,2) ; + S23(9,4,2) ; + S24(9,4,2) ; + S13(9,4,3) ; + S16(9,4,3) ; + S17(9,4,3) ; + S24(9,4,3) ; + S13(9,4,4) ; + S15(9,4,4) ; + S18(9,4,4) ; + S15(9,4,5) ; + S18(9,4,5) ; + for (k=0;k<=1;k++) { + S23(9,5,k) ; + } + S13(9,5,2) ; + S21(9,5,2) ; + S22(9,5,2) ; + S23(9,5,2) ; + S24(9,5,2) ; + S13(9,5,3) ; + S16(9,5,3) ; + S17(9,5,3) ; + S24(9,5,3) ; + S13(9,5,4) ; + S15(9,5,4) ; + S15(9,5,5) ; + for (k=0;k<=1;k++) { + S23(9,6,k) ; + } + S11(9,6,2) ; + S21(9,6,2) ; + S22(9,6,2) ; + S23(9,6,2) ; + S24(9,6,2) ; + S11(9,6,3) ; + S16(9,6,3) ; + S17(9,6,3) ; + S24(9,6,3) ; + S11(9,6,4) ; + for (k=0;k<=1;k++) { + S23(9,7,k) ; + } + S12(9,7,2) ; + S21(9,7,2) ; + S22(9,7,2) ; + S23(9,7,2) ; + S24(9,7,2) ; + S12(9,7,3) ; + S16(9,7,3) ; + S17(9,7,3) ; + S24(9,7,3) ; + S12(9,7,4) ; + for (k=0;k<=1;k++) { + S23(9,8,k) ; + } + S21(9,8,2) ; + S22(9,8,2) ; + S23(9,8,2) ; + S24(9,8,2) ; + S24(9,8,3) ; + S22(9,9,2) ; + for (j=1;j<=3;j++) { + S19(10,j,0) ; + S26(10,j,3) ; + S15(10,j,4) ; + S18(10,j,4) ; + S25(10,j,4) ; + for (k=5;k<=6;k++) { + S15(10,j,k) ; + S18(10,j,k) ; + } + } + for (k=-4;k<=-3;k++) { + S20(10,4,k) ; + } + for (k=-2;k<=-1;k++) { + S14(10,4,k) ; + S20(10,4,k) ; + } + S9(10,4,0) ; + S10(10,4,0) ; + S14(10,4,0) ; + S19(10,4,0) ; + S20(10,4,0) ; + S13(10,4,3) ; + S21(10,4,3) ; + S24(10,4,3) ; + S26(10,4,3) ; + S13(10,4,4) ; + S15(10,4,4) ; + S16(10,4,4) ; + S17(10,4,4) ; + S18(10,4,4) ; + S25(10,4,4) ; + for (k=5;k<=6;k++) { + S15(10,4,k) ; + S18(10,4,k) ; + } + S13(10,5,3) ; + S21(10,5,3) ; + S22(10,5,3) ; + S24(10,5,3) ; + S26(10,5,3) ; + S13(10,5,4) ; + S15(10,5,4) ; + S16(10,5,4) ; + S17(10,5,4) ; + S18(10,5,4) ; + S25(10,5,4) ; + for (k=5;k<=6;k++) { + S15(10,5,k) ; + S18(10,5,k) ; + } + S13(10,6,3) ; + S21(10,6,3) ; + S22(10,6,3) ; + S24(10,6,3) ; + S13(10,6,4) ; + S16(10,6,4) ; + S17(10,6,4) ; + S11(10,7,3) ; + S21(10,7,3) ; + S22(10,7,3) ; + S24(10,7,3) ; + S11(10,7,4) ; + S16(10,7,4) ; + S17(10,7,4) ; + S12(10,8,3) ; + S21(10,8,3) ; + S22(10,8,3) ; + S24(10,8,3) ; + S12(10,8,4) ; + S16(10,8,4) ; + S17(10,8,4) ; + S22(10,9,3) ; + for (i=11;i<=14;i++) { + for (j=1;j<=5;j++) { + S26(i,j,3) ; + S25(i,j,4) ; + } + } +} diff --git a/cloog-core/test/non_optimal/youcef.c b/cloog-core/test/non_optimal/youcef.c new file mode 100644 index 0000000..386cea2 --- /dev/null +++ b/cloog-core/test/non_optimal/youcef.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/non_optimal/youcef.cloog by CLooG 0.14.0-238-gb1cb779 gmp bits in 0.00s. */ +for (i=0;i<=5;i++) { + S1(i,i); + for (j=i;j<=5;j++) { + S2(i,j); + } + S3(i,5); +} diff --git a/cloog-core/test/non_optimal/youcef.cloog b/cloog-core/test/non_optimal/youcef.cloog new file mode 100644 index 0000000..297bf79 --- /dev/null +++ b/cloog-core/test/non_optimal/youcef.cloog @@ -0,0 +1,46 @@ +# Optimal code is in fact : +# +# for (i=0;i<=M;i++) { +# S1 ; +# for (j=0;j<=N;j++) { +# S2 ; +# } +# S3 ; +# } + +# language: C +c + +# parameters {M, N | M>=1 N >=1} +0 2 +0 + +3 # Number of statements + +1 +# {i | 0<=i<=5 i==j} +3 4 +1 1 0 0 +1 -1 0 5 +0 1 -1 0 +0 0 0 + +1 +# {i | 0<=i<=5 i<=j<=5} +4 4 +1 1 0 0 +1 -1 0 5 +1 -1 1 0 +1 0 -1 5 +0 0 0 + +1 +# {i | 0<=i<=5 j==5} +3 4 +1 1 0 0 +1 -1 0 5 +0 0 1 -5 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/non_optimal/youcef.good.c b/cloog-core/test/non_optimal/youcef.good.c new file mode 100644 index 0000000..9fe1d31 --- /dev/null +++ b/cloog-core/test/non_optimal/youcef.good.c @@ -0,0 +1,34 @@ +/* Generated from ../../../git/cloog/test/./non_optimal/youcef.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } + +void test() +{ + /* Original iterators. */ + int i, j; + for (i=0;i<=3;i++) { + S1(i,i) ; + S2(i,i) ; + for (j=i+1;j<=4;j++) { + S2(i,j) ; + } + S2(i,5) ; + S3(i,5) ; + } + S1(4,4) ; + S2(4,4) ; + S2(4,5) ; + S3(4,5) ; + S1(5,5) ; + S2(5,5) ; + S3(5,5) ; +} diff --git a/cloog-core/test/nul_basic1.c b/cloog-core/test/nul_basic1.c new file mode 100644 index 0000000..d6b0cf0 --- /dev/null +++ b/cloog-core/test/nul_basic1.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/nul_basic1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (M >= 0) { + for (i=0;i<=M;i+=2) { + S1(i,i/2) ; + } +} diff --git a/cloog-core/test/nul_basic1.cloog b/cloog-core/test/nul_basic1.cloog new file mode 100644 index 0000000..878bd89 --- /dev/null +++ b/cloog-core/test/nul_basic1.cloog @@ -0,0 +1,28 @@ +# Optimal code is in fact : +# +# for (i=0;i<=M;i+=2) { +# S1 ; +# } + +# language: C +c + +# parameter n +1 3 +# n 1 +1 0 1 +0 + +1 # Number of statements + +1 +# {i, j | i=2*j; 0<=i<=n} +3 5 +# i j n 1 +0 1 -2 0 0 +1 1 0 0 0 +1 -1 0 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/nul_basic2.c b/cloog-core/test/nul_basic2.c new file mode 100644 index 0000000..6231f0e --- /dev/null +++ b/cloog-core/test/nul_basic2.c @@ -0,0 +1,7 @@ +/* Generated from ../../../git/cloog/test/nul_basic2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (i=2;i<=n;i+=2) { + if (i%4 == 0) { + S2(i,i/4) ; + } + S1(i,i/2) ; +} diff --git a/cloog-core/test/nul_basic2.cloog b/cloog-core/test/nul_basic2.cloog new file mode 100644 index 0000000..bf3c78c --- /dev/null +++ b/cloog-core/test/nul_basic2.cloog @@ -0,0 +1,54 @@ +# Optimal code is in fact : +# +# for (i=0;i<=M;i+=2) { +# S1 ; +# } + +# language: C +c + +# parameter n +1 3 +# n 1 +1 1 -2 +1 +n + +2 # Number of statements + +1 +# {i, j | i=2*j; 1<=i<=n} +3 5 +# i j n 1 +0 1 -2 0 0 +1 1 0 0 -1 +1 -1 0 1 0 +0 0 0 + +1 +# {i, j | i=4*j; 1<=i<=n} +3 5 +# i j n 1 +0 1 -4 0 0 +1 1 0 0 -1 +1 -1 0 1 0 +0 0 0 +0 + +0 # Scattering functions +5 10 +# t1 t2 t3 t4 t5 i j n 1 +0 1 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 -1 0 0 0 +0 0 0 1 0 0 0 0 0 0 +0 0 0 0 1 0 0 -1 0 0 +0 0 0 0 0 1 0 0 0 0 + +5 10 +# t1 t2 t3 t4 t5 i j n 1 +0 1 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 -1 0 0 0 +0 0 0 1 0 0 0 0 0 0 +0 0 0 0 1 0 0 -1 0 0 +0 0 0 0 0 1 0 0 0 0 +0 diff --git a/cloog-core/test/nul_lcpc.c b/cloog-core/test/nul_lcpc.c new file mode 100644 index 0000000..b9592f5 --- /dev/null +++ b/cloog-core/test/nul_lcpc.c @@ -0,0 +1,15 @@ +/* Generated from ../../../git/cloog/test/nul_lcpc.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.03s. */ +for (i=1;i<=6;i+=2) { + for (j=1;j<=i;j++) { + S1(i,(i-1)/2,j) ; + S2(i,(i-1)/2,j) ; + } + for (j=i+1;j<=p;j++) { + S1(i,(i-1)/2,j) ; + } +} +for (i=7;i<=m;i+=2) { + for (j=1;j<=p;j++) { + S1(i,(i-1)/2,j) ; + } +} diff --git a/cloog-core/test/nul_lcpc.cloog b/cloog-core/test/nul_lcpc.cloog new file mode 100644 index 0000000..263e1ea --- /dev/null +++ b/cloog-core/test/nul_lcpc.cloog @@ -0,0 +1,39 @@ +# language: C +c + +# parameter n +3 5 +# m n p 1 +1 1 -1 0 -1 +1 0 -1 1 -1 +0 0 1 0 -6 +1 +m n p + +2 # Number of statements + +1 +# {i, j, k | i=2*k+1; 1<=i<=m; 1<=j<=p} +5 8 +# i k j m n p 1 +0 1 -2 0 0 0 0 -1 # i=2*k+1 +1 1 0 0 0 0 0 -1 # 1<=i +1 -1 0 0 1 0 0 0 # i<=m +1 0 0 1 0 0 0 -1 # 1<=j +1 0 0 -1 0 0 1 0 # j<=p +0 0 0 + +1 +# {i, j, k | i=2*k+1; 1<=i<=n; 1<=j<=i} +5 8 +# i k j m n p 1 +0 1 -2 0 0 0 0 -1 # i=2*k+1 +1 1 0 0 0 0 0 -1 # 1<=i +1 -1 0 0 0 1 0 0 # i<=n +1 0 0 1 0 0 0 -1 # 1<=j +1 1 0 -1 0 0 0 0 # j<=i +0 0 0 +1 +i k j + +0 # Scattering functions diff --git a/cloog-core/test/orc.c b/cloog-core/test/orc.c new file mode 100644 index 0000000..d2a1d80 --- /dev/null +++ b/cloog-core/test/orc.c @@ -0,0 +1,52 @@ +/* Generated from /home/skimo/git/cloog/test/orc.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ +S1(0); +for (p2=0;p2<=22;p2++) { + if (p2%2 == 0) { + S2(0,p2/2); + S3(0,p2/2); + } +} +for (p1=2;p1<=6;p1++) { + if ((p1+1)%3 == 0) { + S4((p1-2)/3); + } + if (p1%3 == 0) { + S1(p1/3); + } + if (p1 == 4) { + for (p2=0;p2<=20;p2++) { + if (p2%2 == 0) { + S2(1,p2/2); + S3(1,p2/2); + } + } + } +} +for (p2=0;p2<=18;p2++) { + if (p2%2 == 0) { + S2(2,p2/2); + S3(2,p2/2); + } +} +S4(2); +S5(0); +for (p2=0;p2<=9;p2++) { + S6(0,p2); +} +for (p1=2;p1<=42;p1++) { + if ((p1+1)%3 == 0) { + S7((p1-2)/3); + } + if (p1%3 == 0) { + S5(p1/3); + } + for (p2=0;p2<=9;p2++) { + if ((p1+2)%3 == 0) { + S6((p1-1)/3,p2); + } + } +} +for (p2=0;p2<=9;p2++) { + S6(14,p2); +} +S7(14); diff --git a/cloog-core/test/orc.cloog b/cloog-core/test/orc.cloog new file mode 100644 index 0000000..18c7cf2 --- /dev/null +++ b/cloog-core/test/orc.cloog @@ -0,0 +1,133 @@ +
+
+#-------------------CONTEXT------------------------
+ c # language is c
+ # Context (no constarints on parameters)
+ 1 2 # 1 lines and 2 coloumns
+ # 1
+ 1 0
+
+ 1 # We want to set manually the parameter names
+
+#---------------------STATEMENTS--------------------
+ 7 #Number of Statements
+
+ 1 #STMT 1 at line no. 12 has 1 domain
+
+ # Domain 1
+ 2 3
+ # i 1
+ 1 1 0
+ 1 -1 2
+0 0 0
+ 1 #STMT 2 at line no. 15 has 1 domain
+
+ # Domain 1
+ 4 4
+ # i j 1
+ 1 1 0 0
+ 1 -1 0 2
+ 1 0 1 0
+ 1 -1 -1 11
+0 0 0
+ 1 #STMT 3 at line no. 16 has 1 domain
+
+ # Domain 1
+ 4 4
+ # i j 1
+ 1 1 0 0
+ 1 -1 0 2
+ 1 0 1 0
+ 1 -1 -1 11
+0 0 0
+ 1 #STMT 4 at line no. 20 has 1 domain
+
+ # Domain 1
+ 2 3
+ # i 1
+ 1 1 0
+ 1 -1 2
+0 0 0
+ 1 #STMT 1 at line no. 32 has 1 domain
+
+ # Domain 1
+ 2 3
+ # l 1
+ 1 1 0
+ 1 -1 14
+0 0 0
+ 1 #STMT 2 at line no. 37 has 1 domain
+
+ # Domain 1
+ 4 4
+ # l m 1
+ 1 1 0 0
+ 1 -1 0 14
+ 1 0 1 0
+ 1 0 -1 9
+0 0 0
+ 1 #STMT 3 at line no. 41 has 1 domain
+
+ # Domain 1
+ 2 3
+ # l 1
+ 1 1 0
+ 1 -1 14
+0 0 0
+ 1 # Set Iterator Names
+ i j #Iterator Names
+
+#---------------------SCATTERING FUNCTIONS--------------------
+ 7 #Scattering functions
+
+# Scattering Matrix for stmt at line no.12
+ 3 6
+ # p0 p1 p2 i 1
+ 0 1 0 0 0 0
+ 0 0 1 0 -3 0
+ 0 0 0 1 0 0
+
+# Scattering Matrix for stmt at line no.15
+ 3 7
+ # p0 p1 p2 i j 1
+ 0 1 0 0 0 0 0
+ 0 0 1 0 -3 0 -1
+ 0 0 0 1 0 -2 0
+
+# Scattering Matrix for stmt at line no.16
+ 3 7
+ # p0 p1 p2 i j 1
+ 0 1 0 0 0 0 0
+ 0 0 1 0 -3 0 -1
+ 0 0 0 1 0 -2 -1
+
+# Scattering Matrix for stmt at line no.20
+ 3 6
+ # p0 p1 p2 i 1
+ 0 1 0 0 0 0
+ 0 0 1 0 -3 -2
+ 0 0 0 1 0 0
+
+# Scattering Matrix for stmt at line no.32
+ 3 6
+ # p0 p1 p2 l 1
+ 0 1 0 0 0 -2
+ 0 0 1 0 -3 0
+ 0 0 0 1 0 0
+
+# Scattering Matrix for stmt at line no.37
+ 3 7
+ # p0 p1 p2 l m 1
+ 0 1 0 0 0 0 -2
+ 0 0 1 0 -3 0 -1
+ 0 0 0 1 0 -1 0
+
+# Scattering Matrix for stmt at line no.41
+ 3 6
+ # p0 p1 p2 l 1
+ 0 1 0 0 0 -2
+ 0 0 1 0 -3 -2
+ 0 0 0 1 0 0
+
+ 1 # Set manually the scattering dimension names
+ p0 p1 p2 #Scattering dimension names
diff --git a/cloog-core/test/orc.good.c b/cloog-core/test/orc.good.c new file mode 100644 index 0000000..2b2b7e7 --- /dev/null +++ b/cloog-core/test/orc.good.c @@ -0,0 +1,110 @@ +/* Generated from ../../../git/cloog/test/orc.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.06s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } +#define S4(i) { hash(4); hash(i); } +#define S5(i) { hash(5); hash(i); } +#define S6(i,j) { hash(6); hash(i); hash(j); } +#define S7(i) { hash(7); hash(i); } + +void test() +{ + /* Scattering iterators. */ + int p1, p2; + /* Original iterators. */ + int i, j; + S1(0) ; + S2(0,0) ; + for (p2=1;p2<=22;p2++) { + if ((p2+1)%2 == 0) { + j = (p2-1)/2 ; + S3(0,(p2-1)/2) ; + } + if (p2%2 == 0) { + S2(0,p2/2) ; + } + } + S3(0,11) ; + for (p1=2;p1<=6;p1++) { + if ((p1+1)%3 == 0) { + i = (p1-2)/3 ; + S4((p1-2)/3) ; + } + if ((p1+2)%3 == 0) { + i = (p1-1)/3 ; + S2((p1-1)/3,0) ; + } + if (p1%3 == 0) { + S1(p1/3) ; + } + for (p2=1;p2<=floord(-2*p1+68,3);p2++) { + if ((p1+2)%3 == 0) { + i = (p1-1)/3 ; + if ((p2+1)%2 == 0) { + j = (p2-1)/2 ; + S3((p1-1)/3,(p2-1)/2) ; + } + if (p2%2 == 0) { + S2((p1-1)/3,p2/2) ; + } + } + } + p2 = floord(-2*p1+71,3) ; + if ((p1+2)%3 == 0) { + i = (p1-1)/3 ; + if ((p2+1)%2 == 0) { + j = (p2-1)/2 ; + S3((p1-1)/3,(p2-1)/2) ; + } + } + } + S2(2,0) ; + for (p2=1;p2<=18;p2++) { + if ((p2+1)%2 == 0) { + j = (p2-1)/2 ; + S3(2,(p2-1)/2) ; + } + if (p2%2 == 0) { + S2(2,p2/2) ; + } + } + S3(2,9) ; + S4(2) ; + S5(0) ; + S6(0,0) ; + for (p2=1;p2<=9;p2++) { + S6(0,p2) ; + } + for (p1=2;p1<=42;p1++) { + if ((p1+1)%3 == 0) { + i = (p1-2)/3 ; + S7((p1-2)/3) ; + } + if ((p1+2)%3 == 0) { + i = (p1-1)/3 ; + S6((p1-1)/3,0) ; + } + if (p1%3 == 0) { + S5(p1/3) ; + } + for (p2=1;p2<=9;p2++) { + if ((p1+2)%3 == 0) { + i = (p1-1)/3 ; + S6((p1-1)/3,p2) ; + } + } + } + S6(14,0) ; + for (p2=1;p2<=9;p2++) { + S6(14,p2) ; + } + S7(14) ; +} diff --git a/cloog-core/test/otl.c b/cloog-core/test/otl.c new file mode 100644 index 0000000..93bd830 --- /dev/null +++ b/cloog-core/test/otl.c @@ -0,0 +1,28 @@ +/* Generated from ../../../git/cloog/test/otl.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.26s. */ +if ((M >= 3) && (N >= 4)) { + for (outerTimeTileScatter=1;outerTimeTileScatter<=floord(2*M+2*N-7,5);outerTimeTileScatter++) { + for (outerProcTileScatter1=max(ceild(outerTimeTileScatter,2),ceild(5*outerTimeTileScatter-M-2,5));outerProcTileScatter1<=min(min(floord(M+2*N-5,5),floord(5*outerTimeTileScatter+2*N+1,10)),outerTimeTileScatter);outerProcTileScatter1++) { + for (outerProcTileScatter2=max(max(max(max(ceild(outerTimeTileScatter-outerProcTileScatter1-1,2),ceild(5*outerProcTileScatter1-N-1,5)),ceild(5*outerTimeTileScatter-M-N+1,5)),ceild(5*outerTimeTileScatter-N-2,10)),outerTimeTileScatter-outerProcTileScatter1-1);outerProcTileScatter2<=min(min(min(floord(M+N-2,5),floord(5*outerTimeTileScatter-5*outerProcTileScatter1+N+4,5)),floord(5*outerTimeTileScatter+N+3,10)),outerProcTileScatter1);outerProcTileScatter2++) { + for (innerTimeTileScatter=max(max(max(ceild(10*outerProcTileScatter1-2*N,5),ceild(10*outerProcTileScatter2-N-2,5)),ceild(5*outerProcTileScatter1+5*outerProcTileScatter2-N-3,5)),outerTimeTileScatter);innerTimeTileScatter<=min(min(min(min(min(floord(2*M+2*N-6,5),floord(5*outerProcTileScatter1+M+3,5)),floord(5*outerProcTileScatter2+M+N,5)),floord(10*outerProcTileScatter2+N+3,5)),outerTimeTileScatter+1),outerProcTileScatter1+outerProcTileScatter2+1);innerTimeTileScatter++) { + for (innerProcTileScatter1=max(max(max(max(ceild(innerTimeTileScatter,2),ceild(5*innerTimeTileScatter-M-2,5)),ceild(5*outerTimeTileScatter-M-1,5)),outerProcTileScatter1),outerTimeTileScatter-outerProcTileScatter2);innerProcTileScatter1<=min(min(min(min(min(min(min(floord(M+2*N-4,5),floord(5*outerProcTileScatter2+N+2,5)),floord(-5*outerProcTileScatter2+5*innerTimeTileScatter+N+4,5)),floord(5*outerTimeTileScatter-5*outerProcTileScatter2+N+5,5)),floord(5*innerTimeTileScatter+2*N+2,10)),floord(5*outerTimeTileScatter+2*N+3,10)),outerTimeTileScatter),outerProcTileScatter1+1);innerProcTileScatter1++) { + for (innerProcTileScatter2=outerProcTileScatter2;innerProcTileScatter2<=outerProcTileScatter2;innerProcTileScatter2++) { + for (outerTimeTileIter=outerTimeTileScatter;outerTimeTileIter<=outerTimeTileScatter;outerTimeTileIter++) { + for (outerProcTileIter1=outerProcTileScatter1;outerProcTileIter1<=outerProcTileScatter1;outerProcTileIter1++) { + for (outerProcTileIter2=outerProcTileScatter2;outerProcTileIter2<=outerProcTileScatter2;outerProcTileIter2++) { + for (innerTimeTileIter=innerTimeTileScatter;innerTimeTileIter<=innerTimeTileScatter;innerTimeTileIter++) { + for (innerProcTileIter1=innerProcTileScatter1;innerProcTileIter1<=innerProcTileScatter1;innerProcTileIter1++) { + for (innerProcTileIter2=outerProcTileScatter2;innerProcTileIter2<=outerProcTileScatter2;innerProcTileIter2++) { + S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2); + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/cloog-core/test/otl.cloog b/cloog-core/test/otl.cloog new file mode 100644 index 0000000..5f9b783 --- /dev/null +++ b/cloog-core/test/otl.cloog @@ -0,0 +1,117 @@ +# created: Tue Mar 23 01:51:15 CET 2010 +# ---------------------- CONTEXT ---------------------- +c # language is C + +# Context +2 4 + 1 1 0 -1 + 1 0 1 -1 + + +1 # set parameter names +M N + +# --------------------- STATEMENTS -------------------- +1 + +1 # domains per statement +76 10 + 1 -5 0 0 0 0 0 2 2 -7 + 1 -20 0 0 0 20 20 0 0 16 + 1 -40 0 0 0 0 80 0 8 16 + 1 -4 4 0 0 0 4 0 0 4 + 1 -20 0 0 0 40 0 0 0 8 + 1 -20 0 20 0 20 0 0 0 16 + 1 -20 0 40 0 0 0 0 4 8 + 1 -20 40 0 0 0 0 0 0 16 + 1 -4 4 4 0 0 0 0 0 4 + 1 -20 0 0 0 0 20 4 4 -4 + 1 -10 0 0 0 10 0 2 0 2 + 1 -5 0 0 5 0 0 0 0 3 + 1 -5 5 0 0 0 0 1 0 2 + 1 -10 0 10 0 0 0 2 2 -2 + 1 0 -10 -10 10 0 0 0 2 6 + 1 20 -20 -20 0 0 0 0 4 16 + 1 0 -10 0 10 0 -10 0 2 6 + 1 40 -40 0 0 0 -40 0 8 32 + 1 0 -20 0 10 0 0 0 4 0 + 1 0 -10 0 0 0 0 2 4 -10 + 1 40 -80 0 0 0 0 0 16 8 + 1 0 -10 0 0 0 10 0 2 2 + 1 0 -5 0 0 5 0 0 0 3 + 1 0 -10 0 10 0 0 0 0 4 + 1 0 -5 5 0 0 0 0 1 1 + 1 20 -20 0 0 0 0 0 0 12 + 1 0 0 -10 10 -10 0 0 2 8 + 1 40 0 -40 0 -40 0 0 8 40 + 1 0 0 -20 10 0 0 0 2 4 + 1 0 0 -5 0 0 0 1 1 -2 + 1 40 0 -80 0 0 0 0 8 24 + 1 0 0 -5 0 0 5 0 0 4 + 1 0 0 -10 0 10 0 0 0 4 + 1 0 0 -10 10 0 0 0 0 2 + 1 0 5 -5 0 0 0 0 0 3 + 1 40 0 -40 0 0 0 0 0 16 + 1 0 0 0 -5 0 0 2 2 -6 + 1 0 0 0 -20 20 20 0 0 20 + 1 0 0 0 -40 0 80 0 8 24 + 1 0 20 0 -20 0 20 0 0 24 + 1 0 0 20 -20 20 0 0 0 20 + 1 0 0 0 -20 40 0 0 0 12 + 1 0 0 40 -20 0 0 0 4 12 + 1 0 40 0 -20 0 0 0 0 20 + 1 0 20 20 -20 0 0 0 0 24 + 1 0 0 0 -40 0 40 8 8 0 + 1 0 0 0 -20 20 0 4 0 8 + 1 0 0 20 -20 0 0 4 4 0 + 1 2 0 0 -2 0 0 0 0 2 + 1 0 10 0 -10 0 0 2 0 6 + 1 0 0 0 10 -10 -10 0 2 8 + 1 80 0 0 0 -80 -80 0 16 80 + 1 0 0 0 10 -20 0 0 4 4 + 1 0 0 0 0 -10 0 2 4 -8 + 1 120 0 0 0 -240 0 0 48 72 + 1 0 0 0 0 -20 20 0 4 8 + 1 0 0 0 10 -10 0 0 0 6 + 1 0 0 10 0 -10 0 0 2 4 + 1 0 1 0 0 -1 0 0 0 1 + 1 40 0 0 0 -40 0 0 0 32 + 1 0 0 0 10 0 -20 0 2 4 + 1 0 0 0 0 0 -5 1 1 -2 + 1 80 0 0 0 0 -160 0 16 48 + 1 0 0 0 0 10 -10 0 0 4 + 1 0 0 0 10 0 -10 0 0 2 + 1 0 0 5 0 0 -5 0 0 4 + 1 0 10 0 0 0 -10 0 0 6 + 1 40 0 0 0 0 -40 0 0 16 + 1 0 0 0 0 0 4 0 0 0 + 1 0 0 0 0 20 0 0 0 -8 + 1 0 0 0 20 0 0 0 0 -12 + 1 0 0 4 0 0 0 0 0 0 + 1 0 20 0 0 0 0 0 0 -4 + 1 80 0 0 0 0 0 0 0 -32 + 1 0 0 0 0 0 0 0 1 -4 + 1 0 0 0 0 0 0 1 0 -3 + + +0 0 0 # for future options... + + + +1 # set the iterator names +outerTimeTileIter outerProcTileIter1 outerProcTileIter2 innerTimeTileIter innerProcTileIter1 innerProcTileIter2 + +# --------------------- SCATTERING -------------------- +1 # Scattering functions +6 16 + 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 + + +1 # we set the scattering dimension names +outerTimeTileScatter outerProcTileScatter1 outerProcTileScatter2 innerTimeTileScatter innerProcTileScatter1 innerProcTileScatter2 + diff --git a/cloog-core/test/otl.good.c b/cloog-core/test/otl.good.c new file mode 100644 index 0000000..3004d8e --- /dev/null +++ b/cloog-core/test/otl.good.c @@ -0,0 +1,45 @@ +/* Generated from ../../../git/cloog/test/otl.cloog by CLooG 0.14.0-273-gfe7416f gmp bits in 0.24s. */ +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(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2) { hash(1); hash(outerTimeTileIter); hash(outerProcTileIter1); hash(outerProcTileIter2); hash(innerTimeTileIter); hash(innerProcTileIter1); hash(innerProcTileIter2); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int outerTimeTileScatter, outerProcTileScatter1, outerProcTileScatter2, innerTimeTileScatter, innerProcTileScatter1, innerProcTileScatter2; + /* Original iterators. */ + int outerTimeTileIter, outerProcTileIter1, outerProcTileIter2, innerTimeTileIter, innerProcTileIter1, innerProcTileIter2; + if ((M >= 3) && (N >= 4)) { + for (outerTimeTileScatter=1;outerTimeTileScatter<=floord(2*M+2*N-7,5);outerTimeTileScatter++) { + for (outerProcTileScatter1=max(ceild(outerTimeTileScatter,2),ceild(5*outerTimeTileScatter-M-2,5));outerProcTileScatter1<=min(min(floord(M+2*N-5,5),floord(5*outerTimeTileScatter+2*N+1,10)),outerTimeTileScatter);outerProcTileScatter1++) { + for (outerProcTileScatter2=max(max(max(max(max(ceild(outerTimeTileScatter-outerProcTileScatter1-1,2),ceild(5*outerProcTileScatter1-N-1,5)),ceild(5*outerTimeTileScatter-M-N+1,5)),ceild(5*outerTimeTileScatter-N-2,10)),ceild(5*outerTimeTileScatter-N-3,15)),outerTimeTileScatter-outerProcTileScatter1-1);outerProcTileScatter2<=min(min(min(floord(M+N-2,5),floord(5*outerTimeTileScatter-5*outerProcTileScatter1+N+4,5)),floord(5*outerTimeTileScatter+N+3,10)),outerProcTileScatter1);outerProcTileScatter2++) { + for (innerTimeTileScatter=max(max(max(ceild(10*outerProcTileScatter1-2*N,5),ceild(10*outerProcTileScatter2-N-2,5)),ceild(5*outerProcTileScatter1+5*outerProcTileScatter2-N-3,5)),outerTimeTileScatter);innerTimeTileScatter<=min(min(min(min(min(floord(2*M+2*N-6,5),floord(5*outerProcTileScatter1+M+3,5)),floord(5*outerProcTileScatter2+M+N,5)),floord(10*outerProcTileScatter2+N+3,5)),outerTimeTileScatter+1),outerProcTileScatter1+outerProcTileScatter2+1);innerTimeTileScatter++) { + for (innerProcTileScatter1=max(max(max(max(ceild(innerTimeTileScatter,2),ceild(5*innerTimeTileScatter-M-2,5)),ceild(5*outerTimeTileScatter-M-1,5)),outerProcTileScatter1),outerTimeTileScatter-outerProcTileScatter2);innerProcTileScatter1<=min(min(min(min(min(min(min(floord(M+2*N-4,5),floord(5*outerProcTileScatter2+N+2,5)),floord(-5*outerProcTileScatter2+5*innerTimeTileScatter+N+4,5)),floord(5*outerTimeTileScatter-5*outerProcTileScatter2+N+5,5)),floord(5*innerTimeTileScatter+2*N+2,10)),floord(5*outerTimeTileScatter+2*N+3,10)),outerTimeTileScatter),outerProcTileScatter1+1);innerProcTileScatter1++) { + for (innerProcTileScatter2=outerProcTileScatter2;innerProcTileScatter2<=outerProcTileScatter2;innerProcTileScatter2++) { + for (outerTimeTileIter=outerTimeTileScatter;outerTimeTileIter<=outerTimeTileScatter;outerTimeTileIter++) { + for (outerProcTileIter1=outerProcTileScatter1;outerProcTileIter1<=outerProcTileScatter1;outerProcTileIter1++) { + for (outerProcTileIter2=outerProcTileScatter2;outerProcTileIter2<=outerProcTileScatter2;outerProcTileIter2++) { + for (innerTimeTileIter=innerTimeTileScatter;innerTimeTileIter<=innerTimeTileScatter;innerTimeTileIter++) { + for (innerProcTileIter1=innerProcTileScatter1;innerProcTileIter1<=innerProcTileScatter1;innerProcTileIter1++) { + for (innerProcTileIter2=outerProcTileScatter2;innerProcTileIter2<=outerProcTileScatter2;innerProcTileIter2++) { + S1(outerTimeTileIter,outerProcTileIter1,outerProcTileIter2,innerTimeTileIter,innerProcTileIter1,innerProcTileIter2); + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/cloog-core/test/param-split.c b/cloog-core/test/param-split.c new file mode 100644 index 0000000..97c75b1 --- /dev/null +++ b/cloog-core/test/param-split.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/param-split.cloog by CLooG 0.14.0-277-gce2ba57 gmp bits in 0.00s. */ +for (i=0;i<=M;i++) { + S1(i); + if (i == 0) { + S2(i); + } +} +if (M <= -1) { + S2(0); +} diff --git a/cloog-core/test/param-split.cloog b/cloog-core/test/param-split.cloog new file mode 100644 index 0000000..6f9e58f --- /dev/null +++ b/cloog-core/test/param-split.cloog @@ -0,0 +1,24 @@ +c + +0 3 + +0 + +2 + +1 +2 4 +1 1 0 0 +1 -1 1 0 + +0 0 0 + +1 +1 4 +0 1 0 0 + +0 0 0 + +0 + +0 diff --git a/cloog-core/test/param-split.good.c b/cloog-core/test/param-split.good.c new file mode 100644 index 0000000..25b3bc6 --- /dev/null +++ b/cloog-core/test/param-split.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/param-split.cloog by CLooG 0.14.0-277-gce2ba57 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } + +void test(int M) +{ + /* Original iterators. */ + int i; + if (M >= 0) { + S1(0); + S2(0); + } + for (i=1;i<=M;i++) { + S1(i); + } + if (M <= -1) { + S2(0); + } +} diff --git a/cloog-core/test/rectangle.c b/cloog-core/test/rectangle.c new file mode 100644 index 0000000..dba226a --- /dev/null +++ b/cloog-core/test/rectangle.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/rectangle.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (c1=0;c1<=2*n;c1++) { + for (i=max(0,c1-n);i<=min(c1,n);i++) { + S1(i,c1-i) ; + } +} diff --git a/cloog-core/test/rectangle.cloog b/cloog-core/test/rectangle.cloog new file mode 100644 index 0000000..9f639ab --- /dev/null +++ b/cloog-core/test/rectangle.cloog @@ -0,0 +1,29 @@ +# language: C +c + +# parameter {n | n>= 0} +1 3 +# n 1 +1 1 0 +1 +n + +1 # Number of statements: + +1 +# {ii, i | 0<=i<=n 0<=j<=n} +4 5 +# i j n 1 +1 1 0 0 0 +1 -1 0 1 0 +1 0 1 0 0 +1 0 -1 1 0 +0 0 0 +0 + +1 # Scattering functions + +1 6 +# c1 j i n 1 +0 1 -1 -1 0 0 +0 diff --git a/cloog-core/test/rectangle.good.c b/cloog-core/test/rectangle.good.c new file mode 100644 index 0000000..b977e28 --- /dev/null +++ b/cloog-core/test/rectangle.good.c @@ -0,0 +1,24 @@ +/* Generated from ../../../git/cloog/test/rectangle.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int n) +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i, j; + for (c1=0;c1<=2*n;c1++) { + for (i=max(c1-n,0);i<=min(c1,n);i++) { + j = c1-i ; + S1(i,c1-i) ; + } + } +} diff --git a/cloog-core/test/reservoir/QR.c b/cloog-core/test/reservoir/QR.c new file mode 100644 index 0000000..5a8c26f --- /dev/null +++ b/cloog-core/test/reservoir/QR.c @@ -0,0 +1,117 @@ +/* Generated from ../../../git/cloog/test/./reservoir/QR.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.21s. */ +if (N >= 1) { + S1(0) ; + if ((M >= 1) && (N == 1)) { + for (c4=0;c4<=M-1;c4++) { + S2(0,c4) ; + } + S3(0) ; + for (c4=0;c4<=M-1;c4++) { + S4(0,c4) ; + } + S10(0) ; + S5(0) ; + } + if ((M <= 0) && (N == 1)) { + S3(0) ; + S10(0) ; + S5(0) ; + } + if ((M >= 1) && (N >= 2)) { + for (c4=0;c4<=M-1;c4++) { + S2(0,c4) ; + } + S3(0) ; + for (c4=0;c4<=M-1;c4++) { + S4(0,c4) ; + } + S10(0) ; + S1(1) ; + S5(0) ; + } + if ((M <= 0) && (N >= 2)) { + S3(0) ; + S10(0) ; + S1(1) ; + S5(0) ; + } + for (c2=2;c2<=min(M,N-1);c2++) { + for (c4=c2-1;c4<=N-1;c4++) { + S6(c2-2,c4) ; + for (c6=c2-2;c6<=M-1;c6++) { + S7(c2-2,c4,c6) ; + } + S8(c2-2,c4) ; + for (c6=c2-2;c6<=M-1;c6++) { + S9(c2-2,c4,c6) ; + } + } + for (c4=c2-1;c4<=M-1;c4++) { + S2(c2-1,c4) ; + } + S3(c2-1) ; + for (c4=c2-1;c4<=M-1;c4++) { + S4(c2-1,c4) ; + } + S10(c2-1) ; + S1(c2) ; + S5(c2-1) ; + } + if ((M >= 1) && (M <= N-2)) { + for (c4=M;c4<=N-1;c4++) { + S6(M-1,c4) ; + S7(M-1,c4,M-1) ; + S8(M-1,c4) ; + S9(M-1,c4,M-1) ; + } + S3(M) ; + S10(M) ; + S1(M+1) ; + S5(M) ; + } + for (c2=max(2,M+2);c2<=N-1;c2++) { + for (c4=c2-1;c4<=N-1;c4++) { + S6(c2-2,c4) ; + S8(c2-2,c4) ; + } + S3(c2-1) ; + S10(c2-1) ; + S1(c2) ; + S5(c2-1) ; + } + if ((M >= N) && (N >= 2)) { + S6(N-2,N-1) ; + for (c6=N-2;c6<=M-1;c6++) { + S7(N-2,N-1,c6) ; + } + S8(N-2,N-1) ; + for (c6=N-2;c6<=M-1;c6++) { + S9(N-2,N-1,c6) ; + } + for (c4=N-1;c4<=M-1;c4++) { + S2(N-1,c4) ; + } + S3(N-1) ; + for (c4=N-1;c4<=M-1;c4++) { + S4(N-1,c4) ; + } + S10(N-1) ; + S5(N-1) ; + } + if ((M == N-1) && (M >= 1)) { + S6(M-1,M) ; + S7(M-1,M,M-1) ; + S8(M-1,M) ; + S9(M-1,M,M-1) ; + S3(M) ; + S10(M) ; + S5(M) ; + } + if ((M <= N-2) && (N >= 2)) { + S6(N-2,N-1) ; + S8(N-2,N-1) ; + S3(N-1) ; + S10(N-1) ; + S5(N-1) ; + } +} diff --git a/cloog-core/test/reservoir/QR.cloog b/cloog-core/test/reservoir/QR.cloog new file mode 100755 index 0000000..8baed20 --- /dev/null +++ b/cloog-core/test/reservoir/QR.cloog @@ -0,0 +1,228 @@ +# Language +c + +# Context + + 1 4 + 1 0 0 1 +0 + +# Number of statments +10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 0 0 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 -2 + 0 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 14 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 -2 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 -3 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 12 + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 -4 + 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/QR.good.c b/cloog-core/test/reservoir/QR.good.c new file mode 100644 index 0000000..facd214 --- /dev/null +++ b/cloog-core/test/reservoir/QR.good.c @@ -0,0 +1,208 @@ +/* Generated from ../../../git/cloog/test/./reservoir/QR.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.27s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i) { hash(3); hash(i); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i) { hash(5); hash(i); } +#define S6(i,j) { hash(6); hash(i); hash(j); } +#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } +#define S8(i,j) { hash(8); hash(i); hash(j); } +#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } +#define S10(i) { hash(10); hash(i); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M <= -1) && (N >= 1)) { + S1(0) ; + } + if ((M >= 0) && (N >= 1)) { + S1(0) ; + } + if ((M >= 1) && (N >= 2)) { + for (c4=0;c4<=M-1;c4++) { + S2(0,c4) ; + } + S3(0) ; + for (c4=0;c4<=M-1;c4++) { + S4(0,c4) ; + } + S10(0) ; + S1(1) ; + S5(0) ; + } + if ((M <= 0) && (N >= 2)) { + S3(0) ; + S10(0) ; + S1(1) ; + S5(0) ; + } + if ((M >= 1) && (N == 1)) { + for (c4=0;c4<=M-1;c4++) { + S2(0,c4) ; + } + S3(0) ; + for (c4=0;c4<=M-1;c4++) { + S4(0,c4) ; + } + S10(0) ; + S5(0) ; + } + if ((M <= 0) && (N == 1)) { + S3(0) ; + S10(0) ; + S5(0) ; + } + for (c2=2;c2<=min(N-1,M);c2++) { + for (c4=c2-1;c4<=N-1;c4++) { + i = c2-2 ; + S6(c2-2,c4) ; + for (c6=c2-2;c6<=M-1;c6++) { + i = c2-2 ; + S7(c2-2,c4,c6) ; + } + i = c2-2 ; + S8(c2-2,c4) ; + for (c6=c2-2;c6<=M-1;c6++) { + i = c2-2 ; + S9(c2-2,c4,c6) ; + } + } + for (c4=c2-1;c4<=M-1;c4++) { + i = c2-1 ; + S2(c2-1,c4) ; + } + i = c2-1 ; + S3(c2-1) ; + for (c4=c2-1;c4<=M-1;c4++) { + i = c2-1 ; + S4(c2-1,c4) ; + } + i = c2-1 ; + S10(c2-1) ; + S1(c2) ; + i = c2-1 ; + S5(c2-1) ; + } + if ((M >= 1) && (M <= N-2)) { + c2 = M+1 ; + for (c4=M;c4<=N-1;c4++) { + i = M-1 ; + S6(M-1,c4) ; + c6 = M-1 ; + i = M-1 ; + k = M-1 ; + S7(M-1,c4,M-1) ; + i = M-1 ; + S8(M-1,c4) ; + c6 = M-1 ; + i = M-1 ; + k = M-1 ; + S9(M-1,c4,M-1) ; + } + S3(M) ; + S10(M) ; + i = M+1 ; + S1(M+1) ; + S5(M) ; + } + if ((M >= N) && (N >= 2)) { + c4 = N-1 ; + i = N-2 ; + j = N-1 ; + S6(N-2,N-1) ; + for (c6=N-2;c6<=M-1;c6++) { + i = N-2 ; + j = N-1 ; + S7(N-2,N-1,c6) ; + } + i = N-2 ; + j = N-1 ; + S8(N-2,N-1) ; + for (c6=N-2;c6<=M-1;c6++) { + i = N-2 ; + j = N-1 ; + S9(N-2,N-1,c6) ; + } + for (c4=N-1;c4<=M-1;c4++) { + i = N-1 ; + S2(N-1,c4) ; + } + i = N-1 ; + S3(N-1) ; + for (c4=N-1;c4<=M-1;c4++) { + i = N-1 ; + S4(N-1,c4) ; + } + i = N-1 ; + S10(N-1) ; + i = N-1 ; + S5(N-1) ; + } + if ((M == N-1) && (N >= 2)) { + c4 = N-1 ; + i = N-2 ; + j = N-1 ; + S6(N-2,N-1) ; + c6 = N-2 ; + i = N-2 ; + j = N-1 ; + k = N-2 ; + S7(N-2,N-1,N-2) ; + i = N-2 ; + j = N-1 ; + S8(N-2,N-1) ; + c6 = N-2 ; + i = N-2 ; + j = N-1 ; + k = N-2 ; + S9(N-2,N-1,N-2) ; + i = N-1 ; + S3(N-1) ; + i = N-1 ; + S10(N-1) ; + i = N-1 ; + S5(N-1) ; + } + for (c2=max(M+2,2);c2<=N-1;c2++) { + for (c4=c2-1;c4<=N-1;c4++) { + i = c2-2 ; + S6(c2-2,c4) ; + i = c2-2 ; + S8(c2-2,c4) ; + } + i = c2-1 ; + S3(c2-1) ; + i = c2-1 ; + S10(c2-1) ; + S1(c2) ; + i = c2-1 ; + S5(c2-1) ; + } + if ((M <= N-2) && (N >= 2)) { + c4 = N-1 ; + i = N-2 ; + j = N-1 ; + S6(N-2,N-1) ; + i = N-2 ; + j = N-1 ; + S8(N-2,N-1) ; + i = N-1 ; + S3(N-1) ; + i = N-1 ; + S10(N-1) ; + i = N-1 ; + S5(N-1) ; + } +} diff --git a/cloog-core/test/reservoir/bastoul3.c b/cloog-core/test/reservoir/bastoul3.c new file mode 100644 index 0000000..a89d28e --- /dev/null +++ b/cloog-core/test/reservoir/bastoul3.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/reservoir/bastoul3.cloog by CLooG 0.14.0-308-g2713b64 gmp bits in 0.01s. */ +for (i=3;i<=9;i++) { + for (j=max(i-6,i-2*floord(i-1,2));j<=min(3,i-2);j+=2) { + S1(i,j,(i-j)/2); + } +} diff --git a/cloog-core/test/reservoir/bastoul3.cloog b/cloog-core/test/reservoir/bastoul3.cloog new file mode 100644 index 0000000..8437226 --- /dev/null +++ b/cloog-core/test/reservoir/bastoul3.cloog @@ -0,0 +1,33 @@ +# Figure 4 from "Efficient code generation for automatic parallelization +# and optimization". +# +# Language +c + +# Context + + 1 2 + 1 1 +0 + +# Number of statements +1 + +1 + +# i' i j 1 + 6 5 + 0 1 -1 -2 0 + 1 0 1 0 -1 + 1 0 -1 0 3 + 1 0 0 1 -1 + 1 0 0 -1 3 + 1 0 0 0 1 + +0 0 0 + +0 +0 + + + diff --git a/cloog-core/test/reservoir/cholesky2.c b/cloog-core/test/reservoir/cholesky2.c new file mode 100644 index 0000000..ee3c52e --- /dev/null +++ b/cloog-core/test/reservoir/cholesky2.c @@ -0,0 +1,33 @@ +/* Generated from ../../../git/cloog/test/reservoir/cholesky2.cloog by CLooG 0.14.0-283-g7c18f7a gmp bits in 0.04s. */ +if (M >= 1) { + if (M >= 2) { + S1(1); + } + for (c2=2;c2<=min(3,M);c2++) { + S2(1,c2); + } + if (M == 1) { + S1(1); + } + for (c2=4;c2<=3*M-4;c2++) { + if ((c2+1)%3 == 0) { + S1((c2+1)/3); + } + for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) { + for (c6=ceild(c2-c4+2,2);c6<=min(c4,c2-c4);c6++) { + S3(c2-c4-c6+1,c4,c6); + } + } + for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) { + if ((c2+c4)%2 == 0) { + S2((c2-c4+2)/2,c4); + } + } + } + for (c2=max(2*M,3*M-3);c2<=3*M-2;c2++) { + S3(c2-2*M+1,M,M); + } + if (M >= 2) { + S1(M); + } +} diff --git a/cloog-core/test/reservoir/cholesky2.cloog b/cloog-core/test/reservoir/cholesky2.cloog new file mode 100755 index 0000000..7317c6a --- /dev/null +++ b/cloog-core/test/reservoir/cholesky2.cloog @@ -0,0 +1,79 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } + + 3 4 + 1 1 0 -1 + 1 -1 1 0 + 1 0 0 1 + +0 0 0 +1 +# { (i,j,k) | i-1 >= 0, -i+j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 4 5 + 1 1 0 0 -1 + 1 -1 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -j+l >= 0, -i+k-1 >= 0, j-k >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 -1 + 1 0 -1 0 1 0 + 1 -1 0 1 0 -1 + 1 0 1 -1 0 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +3 + + 8 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -3 0 1 + 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + + + 8 12 + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -2 -1 0 2 + 0 0 0 1 0 0 0 0 0 0 0 -2 + 0 0 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 1 + + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -1 -1 0 1 + 0 0 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/cholesky2.good.c b/cloog-core/test/reservoir/cholesky2.good.c new file mode 100644 index 0000000..36efcde --- /dev/null +++ b/cloog-core/test/reservoir/cholesky2.good.c @@ -0,0 +1,72 @@ +/* Generated from ../../../git/cloog/test/./reservoir/cholesky2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + for (c2=2;c2<=min(3,3*M-4);c2++) { + if ((c2+1)%3 == 0) { + i = (c2+1)/3 ; + S1((c2+1)/3) ; + } + for (c4=ceild(c2+4,3);c4<=min(c2,M);c4++) { + if ((c2+c4)%2 == 0) { + i = (c2-c4+2)/2 ; + S2((c2-c4+2)/2,c4) ; + } + } + } + for (c2=4;c2<=3*M-4;c2++) { + if ((c2+1)%3 == 0) { + i = (c2+1)/3 ; + S1((c2+1)/3) ; + } + for (c4=ceild(c2+2,3);c4<=min(c2-2,M);c4++) { + for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) { + i = c2-c4-c6+1 ; + S3(c2-c4-c6+1,c4,c6) ; + } + } + for (c4=ceild(c2+4,3);c4<=min(M,c2);c4++) { + if ((c2+c4)%2 == 0) { + i = (c2-c4+2)/2 ; + S2((c2-c4+2)/2,c4) ; + } + } + } + for (c2=max(2,3*M-3);c2<=min(3,3*M-2);c2++) { + if ((c2+1)%3 == 0) { + i = (c2+1)/3 ; + S1((c2+1)/3) ; + } + } + for (c2=max(3*M-3,4);c2<=3*M-2;c2++) { + if ((c2+1)%3 == 0) { + i = (c2+1)/3 ; + S1((c2+1)/3) ; + } + for (c4=ceild(c2+2,3);c4<=min(M,c2-2);c4++) { + for (c6=ceild(c2-c4+2,2);c6<=min(c2-c4,c4);c6++) { + i = c2-c4-c6+1 ; + S3(c2-c4-c6+1,c4,c6) ; + } + } + } + if (M >= 1) { + c2 = 3*M-1 ; + S1(M) ; + } +} diff --git a/cloog-core/test/reservoir/fusion1.c b/cloog-core/test/reservoir/fusion1.c new file mode 100644 index 0000000..c2c0adf --- /dev/null +++ b/cloog-core/test/reservoir/fusion1.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/./reservoir/fusion1.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (c2=0;c2<=M;c2++) { + S1(c2) ; +} +for (c2=1;c2<=M;c2++) { + S2(c2) ; +} +for (c2=0;c2<=M;c2++) { + S3(c2) ; +} diff --git a/cloog-core/test/reservoir/fusion1.cloog b/cloog-core/test/reservoir/fusion1.cloog new file mode 100755 index 0000000..3aea334 --- /dev/null +++ b/cloog-core/test/reservoir/fusion1.cloog @@ -0,0 +1,65 @@ +# Language +c + +# Context + + 2 3 + 1 1 -1 + 1 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j) | i >= 0, -i+j >= 0, 1 >= 0 } + + 3 4 + 1 1 0 0 + 1 -1 1 0 + 1 0 0 1 + +0 0 0 +1 +# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } + + 3 4 + 1 1 0 -1 + 1 -1 1 0 + 1 0 0 1 + +0 0 0 +1 +# { (i,j) | i >= 0, -i+j >= 0, 1 >= 0 } + + 3 4 + 1 1 0 0 + 1 -1 1 0 + 1 0 0 1 + +0 0 0 +0 +# Scattering functions +3 + + 4 7 + 0 1 0 0 0 0 0 + 0 0 1 0 -1 0 0 + 0 0 0 1 0 0 0 + 1 0 0 0 0 0 1 + + + 4 7 + 0 1 0 0 0 0 -1 + 0 0 1 0 -1 0 0 + 0 0 0 1 0 0 0 + 1 0 0 0 0 0 1 + + + 4 7 + 0 1 0 0 0 0 -2 + 0 0 1 0 -1 0 0 + 0 0 0 1 0 0 0 + 1 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/fusion1.good.c b/cloog-core/test/reservoir/fusion1.good.c new file mode 100644 index 0000000..ba28eba --- /dev/null +++ b/cloog-core/test/reservoir/fusion1.good.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/./reservoir/fusion1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i) { hash(2); hash(i); } +#define S3(i) { hash(3); hash(i); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2; + /* Original iterators. */ + int i; + for (c2=0;c2<=M;c2++) { + S1(c2) ; + } + for (c2=1;c2<=M;c2++) { + S2(c2) ; + } + for (c2=0;c2<=M;c2++) { + S3(c2) ; + } +} diff --git a/cloog-core/test/reservoir/fusion2.c b/cloog-core/test/reservoir/fusion2.c new file mode 100644 index 0000000..d9d02d6 --- /dev/null +++ b/cloog-core/test/reservoir/fusion2.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/./reservoir/fusion2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +if ((M >= 1) && (N >= 1)) { + for (c4=1;c4<=M;c4++) { + S1(1,c4) ; + } + for (c2=2;c2<=N;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2-1,c4) ; + } + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c4=1;c4<=M;c4++) { + S2(N,c4) ; + } +} diff --git a/cloog-core/test/reservoir/fusion2.cloog b/cloog-core/test/reservoir/fusion2.cloog new file mode 100755 index 0000000..dad8353 --- /dev/null +++ b/cloog-core/test/reservoir/fusion2.cloog @@ -0,0 +1,56 @@ +# Language +c + +# Context + + 1 4 + 1 0 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 -1 + 1 -1 0 0 1 0 + 1 0 1 0 0 -1 + 1 0 -1 1 0 0 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 -1 + 1 -1 0 0 1 0 + 1 0 1 0 0 -1 + 1 0 -1 1 0 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 6 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + + + 6 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/fusion2.good.c b/cloog-core/test/reservoir/fusion2.good.c new file mode 100644 index 0000000..b4b8f1c --- /dev/null +++ b/cloog-core/test/reservoir/fusion2.good.c @@ -0,0 +1,41 @@ +/* Generated from ../../../git/cloog/test/./reservoir/fusion2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + if ((M >= 1) && (N >= 1)) { + for (c4=1;c4<=M;c4++) { + S1(1,c4) ; + } + } + if (M >= 1) { + for (c2=2;c2<=N;c2++) { + for (c4=1;c4<=M;c4++) { + i = c2-1 ; + S2(c2-1,c4) ; + } + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + } + if ((M >= 1) && (N >= 1)) { + c2 = N+1 ; + for (c4=1;c4<=M;c4++) { + S2(N,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/jacobi2.c b/cloog-core/test/reservoir/jacobi2.c new file mode 100644 index 0000000..421e8a9 --- /dev/null +++ b/cloog-core/test/reservoir/jacobi2.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/./reservoir/jacobi2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (c2=0;c2<=M-1;c2++) { + for (c4=0;c4<=M-1;c4++) { + S1(c2,c4) ; + } +} diff --git a/cloog-core/test/reservoir/jacobi2.cloog b/cloog-core/test/reservoir/jacobi2.cloog new file mode 100755 index 0000000..7352362 --- /dev/null +++ b/cloog-core/test/reservoir/jacobi2.cloog @@ -0,0 +1,37 @@ +# Language +c + +# Context + + 2 3 + 1 1 -1 + 1 0 1 +0 + +# Number of statments +1 + +1 +# { (i,j,k) | i >= 0, -i+k-1 >= 0, j >= 0, -j+k-1 >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 0 + 1 -1 0 1 -1 + 1 0 1 0 0 + 1 0 -1 1 -1 + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +1 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/jacobi2.good.c b/cloog-core/test/reservoir/jacobi2.good.c new file mode 100644 index 0000000..8c6ea0e --- /dev/null +++ b/cloog-core/test/reservoir/jacobi2.good.c @@ -0,0 +1,23 @@ +/* Generated from ../../../git/cloog/test/./reservoir/jacobi2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + for (c2=0;c2<=M-1;c2++) { + for (c4=0;c4<=M-1;c4++) { + S1(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/jacobi3.c b/cloog-core/test/reservoir/jacobi3.c new file mode 100644 index 0000000..0182c15 --- /dev/null +++ b/cloog-core/test/reservoir/jacobi3.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/./reservoir/jacobi3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +if ((M >= 1) && (N >= 3)) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S1(1,c4,c6) ; + } + } + for (c2=3;c2<=2*M;c2++) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if (c2%2 == 0) { + S1(c2/2,c4,c6) ; + } + } + } + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if ((c2+1)%2 == 0) { + S2((c2-1)/2,c4,c6) ; + } + } + } + } + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S2(M,c4,c6) ; + } + } +} diff --git a/cloog-core/test/reservoir/jacobi3.cloog b/cloog-core/test/reservoir/jacobi3.cloog new file mode 100755 index 0000000..dff32ff --- /dev/null +++ b/cloog-core/test/reservoir/jacobi3.cloog @@ -0,0 +1,64 @@ +# Language +c + +# Context + + 1 4 + 1 0 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } + + 7 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 1 0 0 + 1 0 1 0 0 0 -2 + 1 0 -1 0 0 1 -1 + 1 0 0 1 0 0 -2 + 1 0 0 -1 0 1 -1 + 1 0 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } + + 7 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 1 0 0 + 1 0 1 0 0 0 -2 + 1 0 -1 0 0 1 -1 + 1 0 0 1 0 0 -2 + 1 0 0 -1 0 1 -1 + 1 0 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 8 14 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -2 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 14 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -2 0 0 0 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/jacobi3.good.c b/cloog-core/test/reservoir/jacobi3.good.c new file mode 100644 index 0000000..39cfce3 --- /dev/null +++ b/cloog-core/test/reservoir/jacobi3.good.c @@ -0,0 +1,53 @@ +/* Generated from ../../../git/cloog/test/./reservoir/jacobi3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ +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); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M >= 1) && (N >= 3)) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S1(1,c4,c6) ; + } + } + } + if (N >= 3) { + for (c2=3;c2<=2*M;c2++) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if (c2%2 == 0) { + S1(c2/2,c4,c6) ; + } + } + } + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if ((c2+1)%2 == 0) { + i = (c2-1)/2 ; + S2((c2-1)/2,c4,c6) ; + } + } + } + } + } + if ((M >= 1) && (N >= 3)) { + c2 = 2*M+1 ; + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S2(M,c4,c6) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam1.c b/cloog-core/test/reservoir/lim-lam1.c new file mode 100644 index 0000000..469117c --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam1.c @@ -0,0 +1,25 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/lim-lam1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ +S1(1,100); +for (c2=-98;c2<=99;c2++) { + if (c2 <= 0) { + S1(1,-c2+1); + } + if (c2 >= 1) { + S2(c2,1); + } + for (c4=max(2,-2*c2+3);c4<=min(199,-2*c2+200);c4++) { + if (c4%2 == 0) { + S1((2*c2+c4)/2,c4/2); + } + if ((c4+1)%2 == 0) { + S2((2*c2+c4-1)/2,(c4+1)/2); + } + } + if (c2 <= 0) { + S1(c2+100,100); + } + if (c2 >= 1) { + S2(100,-c2+101); + } +} +S2(100,1); diff --git a/cloog-core/test/reservoir/lim-lam1.cloog b/cloog-core/test/reservoir/lim-lam1.cloog new file mode 100644 index 0000000..7a7c684 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam1.cloog @@ -0,0 +1,54 @@ +# Language +c + +# Context + + 1 2 + 1 1 +0 + +# Number of statments +2 + +1 +# { (i,j) | i-1 >= 0, -i+100 >= 0, j-1 >= 0, -j+100 >= 0 } + + 4 4 + 1 1 0 -1 + 1 -1 0 100 + 1 0 1 -1 + 1 0 -1 100 + +0 0 0 +1 +# { (i,j) | i-1 >= 0, -i+100 >= 0, j-1 >= 0, -j+100 >= 0 } + + 4 4 + 1 1 0 -1 + 1 -1 0 100 + 1 0 1 -1 + 1 0 -1 100 + +0 0 0 +0 +# Scattering functions +2 + + 6 9 + 0 1 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 1 0 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 1 0 0 -2 0 + 0 0 0 0 0 1 0 0 0 + 1 0 0 0 0 0 0 0 1 + + + 6 9 + 0 1 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 1 -1 + 0 0 0 1 0 0 0 0 0 + 0 0 0 0 1 0 0 -2 1 + 0 0 0 0 0 1 0 0 -1 + 1 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/lim-lam1.good.c b/cloog-core/test/reservoir/lim-lam1.good.c new file mode 100644 index 0000000..cd6faf7 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam1.good.c @@ -0,0 +1,56 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test() +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + S1(1,100) ; + for (c2=-98;c2<=0;c2++) { + c4 = -2*c2+2 ; + j = -c2+1 ; + S1(1,-c2+1) ; + for (c4=-2*c2+3;c4<=199;c4++) { + if (c4%2 == 0) { + i = (2*c2+c4)/2 ; + S1((2*c2+c4)/2,c4/2) ; + } + if ((c4+1)%2 == 0) { + i = (2*c2+c4-1)/2 ; + j = (c4+1)/2 ; + S2((2*c2+c4-1)/2,(c4+1)/2) ; + } + } + i = c2+100 ; + S1(c2+100,100) ; + } + for (c2=1;c2<=99;c2++) { + S2(c2,1) ; + for (c4=2;c4<=-2*c2+200;c4++) { + if (c4%2 == 0) { + i = (2*c2+c4)/2 ; + S1((2*c2+c4)/2,c4/2) ; + } + if ((c4+1)%2 == 0) { + i = (2*c2+c4-1)/2 ; + j = (c4+1)/2 ; + S2((2*c2+c4-1)/2,(c4+1)/2) ; + } + } + c4 = -2*c2+201 ; + j = -c2+101 ; + S2(100,-c2+101) ; + } + S2(100,1) ; +} diff --git a/cloog-core/test/reservoir/lim-lam2.c b/cloog-core/test/reservoir/lim-lam2.c new file mode 100644 index 0000000..ab1a32f --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam2.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +for (c2=1;c2<=M;c2++) { + S1(c2) ; +} +if (N >= 2) { + for (c2=1;c2<=M;c2++) { + for (c4=2;c4<=N;c4++) { + S2(c2,c4) ; + } + } +} +if (N >= 2) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=N-1;c4++) { + S3(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam2.cloog b/cloog-core/test/reservoir/lim-lam2.cloog new file mode 100755 index 0000000..db50b74 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam2.cloog @@ -0,0 +1,76 @@ +# Language +c + +# Context + + 3 4 + 1 1 0 -1 + 1 0 1 -1 + 1 0 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j,k) | i-1 >= 0, -i+j >= 0, 1 >= 0 } + + 3 5 + 1 1 0 0 -1 + 1 -1 1 0 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-2 >= 0, -j+l >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 -1 + 1 -1 0 1 0 0 + 1 0 1 0 0 -2 + 1 0 -1 0 1 0 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+l-1 >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 -1 + 1 -1 0 1 0 0 + 1 0 1 0 0 -1 + 1 0 -1 0 1 -1 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +3 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + + + 6 11 + 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 -1 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + + + 6 11 + 0 1 0 0 0 0 0 0 0 0 -2 + 0 0 1 0 0 0 -1 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 -2 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/lim-lam2.good.c b/cloog-core/test/reservoir/lim-lam2.good.c new file mode 100644 index 0000000..0ea3332 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam2.good.c @@ -0,0 +1,37 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + for (c2=1;c2<=M;c2++) { + S1(c2) ; + } + if (N >= 2) { + for (c2=1;c2<=M;c2++) { + for (c4=2;c4<=N;c4++) { + S2(c2,c4) ; + } + } + } + if (N >= 2) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=N-1;c4++) { + S3(c2,c4) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam3.c b/cloog-core/test/reservoir/lim-lam3.c new file mode 100644 index 0000000..e2026d9 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam3.c @@ -0,0 +1,37 @@ +/* Generated from ../../../git/cloog/test/reservoir/lim-lam3.cloog by CLooG 0.14.0-333-g4442dac gmp bits in 0.03s. */ +S4(1); +for (c2=9;c2<=min(13,5*M-1);c2++) { + if (c2 <= M+7) { + S2(c2-7,1); + } + if (c2 == 10) { + S4(2); + } + if (c2%3 == 0) { + S3((c2-3)/3,1); + } +} +if (M == 2) { + S4(2); +} +for (c2=14;c2<=5*M-1;c2++) { + for (c4=max(2,ceild(c2-M-3,4));c4<=min(floord(c2-8,3),M-1);c4++) { + for (c6=max(1,ceild(c2-2*c4-M-5,2));c6<=min(floord(c2-3*c4-6,2),c4-1);c6++) { + S1(c2-2*c4-2*c6-5,c4,c6); + } + } + for (c4=max(1,ceild(c2-M-3,4));c4<=floord(c2-4,5);c4++) { + S2(c2-4*c4-3,c4); + } + if (c2%5 == 0) { + S4(c2/5); + } + for (c4=max(1,ceild(c2-3*M-1,2));c4<=floord(c2-4,5);c4++) { + if ((c2+c4+2)%3 == 0) { + S3((c2-2*c4-1)/3,c4); + } + } +} +if (M >= 3) { + S4(M); +} diff --git a/cloog-core/test/reservoir/lim-lam3.cloog b/cloog-core/test/reservoir/lim-lam3.cloog new file mode 100755 index 0000000..0d3d4a5 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam3.cloog @@ -0,0 +1,101 @@ +# Language +c + +# Context + + 2 3 + 1 1 -1 + 1 0 1 +0 + +# Number of statments +4 + +1 +# { (i,j,k,l) | -i+l >= 0, i-j-1 >= 0, k-1 >= 0, j-k-1 >= 0, 1 >= 0 } + + 5 6 + 1 -1 0 0 1 0 + 1 1 -1 0 0 -1 + 1 0 0 1 0 -1 + 1 0 1 -1 0 -1 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } + + 4 5 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 1 -1 0 -1 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } + + 4 5 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 1 -1 0 -1 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j) | i-1 >= 0, -i+j >= 0, 1 >= 0 } + + 3 4 + 1 1 0 -1 + 1 -1 1 0 + 1 0 0 1 + +0 0 0 +0 +# Scattering functions +4 + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -2 -2 0 -5 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 12 + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -4 0 -3 + 0 0 0 1 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 1 + + + 8 12 + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -3 -2 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 -2 + 0 0 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 1 + + + 8 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -5 0 0 + 0 0 0 1 0 0 0 0 0 0 -2 + 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/lim-lam3.good.c b/cloog-core/test/reservoir/lim-lam3.good.c new file mode 100644 index 0000000..0cddca9 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam3.good.c @@ -0,0 +1,66 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.04s. */ +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) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } +#define S4(i) { hash(4); hash(i); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + for (c2=5;c2<=min(5*M,8);c2++) { + if (c2%5 == 0) { + S4(c2/5) ; + } + } + for (c2=9;c2<=min(13,5*M-1);c2++) { + for (c4=max(1,ceild(c2-M-3,4));c4<=floord(c2-4,5);c4++) { + i = c2-4*c4-3 ; + S2(c2-4*c4-3,c4) ; + } + if (c2%5 == 0) { + S4(c2/5) ; + } + for (c4=max(1,ceild(c2-3*M-1,2));c4<=floord(c2-4,5);c4++) { + if ((c2+c4+2)%3 == 0) { + i = (c2-2*c4-1)/3 ; + S3((c2-2*c4-1)/3,c4) ; + } + } + } + for (c2=14;c2<=5*M-1;c2++) { + for (c4=max(2,ceild(c2-M-3,4));c4<=min(M-1,floord(c2-8,3));c4++) { + for (c6=max(1,ceild(c2-2*c4-M-5,2));c6<=min(c4-1,floord(c2-3*c4-6,2));c6++) { + i = c2-2*c4-2*c6-5 ; + S1(c2-2*c4-2*c6-5,c4,c6) ; + } + } + for (c4=max(ceild(c2-M-3,4),1);c4<=floord(c2-4,5);c4++) { + i = c2-4*c4-3 ; + S2(c2-4*c4-3,c4) ; + } + if (c2%5 == 0) { + S4(c2/5) ; + } + for (c4=max(ceild(c2-3*M-1,2),1);c4<=floord(c2-4,5);c4++) { + if ((c2+c4+2)%3 == 0) { + i = (c2-2*c4-1)/3 ; + S3((c2-2*c4-1)/3,c4) ; + } + } + } + if (M >= 2) { + c2 = 5*M ; + S4(M) ; + } +} diff --git a/cloog-core/test/reservoir/lim-lam4.c b/cloog-core/test/reservoir/lim-lam4.c new file mode 100644 index 0000000..b2c0845 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam4.c @@ -0,0 +1,17 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ +if (M >= 2) { + S1(1,0,0) ; + for (c2=2;c2<=2*M-2;c2++) { + for (c4=max(-M+1,-c2+1);c4<=-1;c4++) { + for (i=max(1,c2-M+1);i<=min(M-1,c2+c4);i++) { + S1(i,c2+c4-i,-c4) ; + } + for (c6=max(-c4,c2-M+1);c6<=min(M-1,c2-1);c6++) { + S2(c2-c6,c4+c6,c6) ; + } + } + for (i=max(1,c2-M+1);i<=min(c2,M-1);i++) { + S1(i,c2-i,0) ; + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam4.cloog b/cloog-core/test/reservoir/lim-lam4.cloog new file mode 100755 index 0000000..0aa66e3 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam4.cloog @@ -0,0 +1,62 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k,l) | i-1 >= 0, -i+l-1 >= 0, j >= 0, k >= 0, -j-k+l-1 >= 0, 1 >= 0 } + + 6 6 + 1 1 0 0 0 -1 + 1 -1 0 0 1 -1 + 1 0 1 0 0 0 + 1 0 0 1 0 0 + 1 0 -1 -1 1 -1 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -i+l-1 >= 0, j >= 0, -j+k-1 >= 0, -k+l-1 >= 0, 1 >= 0 } + + 6 6 + 1 1 0 0 0 -1 + 1 -1 0 0 1 -1 + 1 0 1 0 0 0 + 1 0 -1 1 0 -1 + 1 0 0 -1 1 -1 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -1 -1 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 -1 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/lim-lam4.good.c b/cloog-core/test/reservoir/lim-lam4.good.c new file mode 100644 index 0000000..afb05ec --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam4.good.c @@ -0,0 +1,39 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if (M >= 2) { + S1(1,0,0) ; + } + for (c2=2;c2<=2*M-2;c2++) { + for (c4=max(-M+1,-c2+1);c4<=-1;c4++) { + for (i=max(1,c2-M+1);i<=min(c2+c4,M-1);i++) { + j = c2+c4-i ; + S1(i,c2+c4-i,-c4) ; + } + for (c6=max(-c4,c2-M+1);c6<=min(c2-1,M-1);c6++) { + i = c2-c6 ; + j = c4+c6 ; + S2(c2-c6,c4+c6,c6) ; + } + } + for (i=max(1,c2-M+1);i<=min(M-1,c2);i++) { + j = c2-i ; + S1(i,c2-i,0) ; + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam5.c b/cloog-core/test/reservoir/lim-lam5.c new file mode 100644 index 0000000..e6b0a57 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam5.c @@ -0,0 +1,18 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (M >= 1) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S3(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam5.cloog b/cloog-core/test/reservoir/lim-lam5.cloog new file mode 100755 index 0000000..c5d6ef9 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam5.cloog @@ -0,0 +1,76 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +3 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + + + 6 10 + 0 1 0 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + + + 6 10 + 0 1 0 0 0 0 0 0 0 -2 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/lim-lam5.good.c b/cloog-core/test/reservoir/lim-lam5.good.c new file mode 100644 index 0000000..69d8805 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam5.good.c @@ -0,0 +1,35 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S3(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam6.c b/cloog-core/test/reservoir/lim-lam6.c new file mode 100644 index 0000000..05baff1 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam6.c @@ -0,0 +1,13 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (M >= 1) { + for (c2=0;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=0;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c4,c2) ; + } + } +} diff --git a/cloog-core/test/reservoir/lim-lam6.cloog b/cloog-core/test/reservoir/lim-lam6.cloog new file mode 100755 index 0000000..a1bf181 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam6.cloog @@ -0,0 +1,56 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k) | i >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 0 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 0 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + + + 6 10 + 0 1 0 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/lim-lam6.good.c b/cloog-core/test/reservoir/lim-lam6.good.c new file mode 100644 index 0000000..f49ab57 --- /dev/null +++ b/cloog-core/test/reservoir/lim-lam6.good.c @@ -0,0 +1,33 @@ +/* Generated from ../../../git/cloog/test/./reservoir/lim-lam6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + if (M >= 1) { + for (c2=0;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + } + if (M >= 1) { + for (c2=0;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c4,c2) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/liu-zhuge1.c b/cloog-core/test/reservoir/liu-zhuge1.c new file mode 100644 index 0000000..b0f8602 --- /dev/null +++ b/cloog-core/test/reservoir/liu-zhuge1.c @@ -0,0 +1,47 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/liu-zhuge1.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ +if ((M >= 0) && (N >= 0)) { + for (c2=-4;c2<=min(-1,3*M+N-4);c2++) { + for (c4=max(0,c2-3*M+4);c4<=min(N,c2+4);c4++) { + if ((c2+2*c4+1)%3 == 0) { + S1((c2-c4+4)/3,c4); + } + } + } + for (c2=0;c2<=3*M+N-4;c2++) { + for (c4=max(0,c2-3*M);c4<=min(c2,c2-3*M+3);c4++) { + if ((c2+2*c4)%3 == 0) { + S2((c2-c4)/3,c4); + } + } + for (c4=max(0,c2-3*M+4);c4<=min(N,c2);c4++) { + if ((c2+2*c4)%3 == 0) { + S2((c2-c4)/3,c4); + } + if ((c2+2*c4+1)%3 == 0) { + S1((c2-c4+4)/3,c4); + } + } + for (c4=max(c2+1,c2-3*M+4);c4<=min(N,c2+4);c4++) { + if ((c2+2*c4+1)%3 == 0) { + S1((c2-c4+4)/3,c4); + } + } + for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { + if ((c2+2*c4)%3 == 0) { + S3((c2-c4)/3,c4); + } + } + } + for (c2=max(0,3*M+N-3);c2<=3*M+N;c2++) { + for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { + if ((c2+2*c4)%3 == 0) { + S2((c2-c4)/3,c4); + } + } + for (c4=max(0,c2-3*M);c4<=min(N,c2);c4++) { + if ((c2+2*c4)%3 == 0) { + S3((c2-c4)/3,c4); + } + } + } +} diff --git a/cloog-core/test/reservoir/liu-zhuge1.cloog b/cloog-core/test/reservoir/liu-zhuge1.cloog new file mode 100755 index 0000000..e28cb4b --- /dev/null +++ b/cloog-core/test/reservoir/liu-zhuge1.cloog @@ -0,0 +1,76 @@ +# Language +c + +# Context + + 1 4 + 1 0 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 0 + 1 -1 0 1 0 0 + 1 0 1 0 0 0 + 1 0 -1 0 1 0 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 0 + 1 -1 0 1 0 0 + 1 0 1 0 0 0 + 1 0 -1 0 1 0 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i >= 0, -i+k >= 0, j >= 0, -j+l >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 0 + 1 -1 0 1 0 0 + 1 0 1 0 0 0 + 1 0 -1 0 1 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +3 + + 6 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -3 -1 0 0 4 + 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + + + 6 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -3 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + + + 6 11 + 0 1 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -3 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/liu-zhuge1.good.c b/cloog-core/test/reservoir/liu-zhuge1.good.c new file mode 100644 index 0000000..2b07ade --- /dev/null +++ b/cloog-core/test/reservoir/liu-zhuge1.good.c @@ -0,0 +1,168 @@ +/* Generated from ../../../git/cloog/test/./reservoir/liu-zhuge1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i,j) { hash(3); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + if ((M >= 0) && (N >= 0)) { + for (c2=-4;c2<=min(-1,3*M+N-4);c2++) { + for (c4=max(0,c2-3*M+4);c4<=min(c2+4,N);c4++) { + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + } + } + if ((M <= 1) && (M >= 0)) { + for (c2=0;c2<=3*M+N-4;c2++) { + for (c4=max(c2-3*M,0);c4<=c2;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + } + for (c4=c2-3*M+4;c4<=min(c2+4,N);c4++) { + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=max(0,c2-3*M);c4<=c2;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S3((c2-c4)/3,c4) ; + } + } + } + } + for (c2=0;c2<=min(3*M-4,N-1);c2++) { + for (c4=0;c4<=c2;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=c2+1;c4<=min(c2+4,N);c4++) { + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=0;c4<=c2;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S3((c2-c4)/3,c4) ; + } + } + } + if (M >= 2) { + for (c2=3*M-3;c2<=N-1;c2++) { + for (c4=max(c2-3*M,0);c4<=c2-3*M+3;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + } + for (c4=c2-3*M+4;c4<=c2;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=c2+1;c4<=min(c2+4,N);c4++) { + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=max(0,c2-3*M);c4<=c2;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S3((c2-c4)/3,c4) ; + } + } + } + } + if (N >= 0) { + for (c2=N;c2<=3*M-4;c2++) { + for (c4=0;c4<=N;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=0;c4<=N;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S3((c2-c4)/3,c4) ; + } + } + } + } + for (c2=max(3*M-3,N);c2<=3*M+N-4;c2++) { + for (c4=max(c2-3*M,0);c4<=c2-3*M+3;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + } + for (c4=c2-3*M+4;c4<=N;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + if ((c2+2*c4+1)%3 == 0) { + i = (c2-c4+4)/3 ; + S1((c2-c4+4)/3,c4) ; + } + } + for (c4=max(0,c2-3*M);c4<=N;c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S3((c2-c4)/3,c4) ; + } + } + } + if ((M >= 0) && (N >= 0)) { + for (c2=max(3*M+N-3,0);c2<=3*M+N;c2++) { + for (c4=max(0,c2-3*M);c4<=min(c2,N);c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S2((c2-c4)/3,c4) ; + } + } + for (c4=max(0,c2-3*M);c4<=min(c2,N);c4++) { + if ((c2+2*c4)%3 == 0) { + i = (c2-c4)/3 ; + S3((c2-c4)/3,c4) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/loechner3.c b/cloog-core/test/reservoir/loechner3.c new file mode 100644 index 0000000..c3967b8 --- /dev/null +++ b/cloog-core/test/reservoir/loechner3.c @@ -0,0 +1,10 @@ +/* Generated from ../../../git/cloog/test/./reservoir/loechner3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (M >= 1) { + for (c2=1;c2<=M;c2++) { + for (c4=2;c4<=c2+M;c4++) { + for (c6=max(1,-c2+c4);c6<=min(M,c4-1);c6++) { + S1(c2,c6,c4-c6) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/loechner3.cloog b/cloog-core/test/reservoir/loechner3.cloog new file mode 100755 index 0000000..04b34cb --- /dev/null +++ b/cloog-core/test/reservoir/loechner3.cloog @@ -0,0 +1,39 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +1 + +1 +# { (i,j,k,l) | -i+l >= 0, j-1 >= 0, -j+l >= 0, k-1 >= 0, i-k >= 0, 1 >= 0 } + + 6 6 + 1 -1 0 0 1 0 + 1 0 1 0 0 -1 + 1 0 -1 0 1 0 + 1 0 0 1 0 -1 + 1 1 0 -1 0 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +1 + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/loechner3.good.c b/cloog-core/test/reservoir/loechner3.good.c new file mode 100644 index 0000000..377fb46 --- /dev/null +++ b/cloog-core/test/reservoir/loechner3.good.c @@ -0,0 +1,26 @@ +/* Generated from ../../../git/cloog/test/./reservoir/loechner3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + for (c2=1;c2<=M;c2++) { + for (c4=2;c4<=c2+M;c4++) { + for (c6=max(1,-c2+c4);c6<=min(M,c4-1);c6++) { + k = c4-c6 ; + S1(c2,c6,c4-c6) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/loechner4.c b/cloog-core/test/reservoir/loechner4.c new file mode 100644 index 0000000..8c4b9c7 --- /dev/null +++ b/cloog-core/test/reservoir/loechner4.c @@ -0,0 +1,12 @@ +/* Generated from ../../../git/cloog/test/./reservoir/loechner4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +if (M >= 1) { + for (c2=2;c2<=2*M;c2++) { + for (c4=1;c4<=M;c4++) { + for (c6=1;c6<=M;c6++) { + for (c8=max(1,c2-M);c8<=min(M,c2-1);c8++) { + S1(c6,c4,c8,c2-c8) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/loechner4.cloog b/cloog-core/test/reservoir/loechner4.cloog new file mode 100755 index 0000000..503f56a --- /dev/null +++ b/cloog-core/test/reservoir/loechner4.cloog @@ -0,0 +1,44 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +1 + +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+m >= 0, j-1 >= 0, -j+m >= 0, k-1 >= 0, -k+m >= 0, l-1 >= 0, -l+m >= 0, 1 >= 0 } + + 9 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 0 1 0 + 1 0 1 0 0 0 -1 + 1 0 -1 0 0 1 0 + 1 0 0 1 0 0 -1 + 1 0 0 -1 0 1 0 + 1 0 0 0 1 0 -1 + 1 0 0 0 -1 1 0 + 1 0 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +1 + + 10 16 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 -1 -1 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/loechner4.good.c b/cloog-core/test/reservoir/loechner4.good.c new file mode 100644 index 0000000..ecd109e --- /dev/null +++ b/cloog-core/test/reservoir/loechner4.good.c @@ -0,0 +1,28 @@ +/* Generated from ../../../git/cloog/test/./reservoir/loechner4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6, c8; + /* Original iterators. */ + int i, j, k, l; + for (c2=2;c2<=2*M;c2++) { + for (c4=1;c4<=M;c4++) { + for (c6=1;c6<=M;c6++) { + for (c8=max(1,c2-M);c8<=min(c2-1,M);c8++) { + l = c2-c8 ; + S1(c6,c4,c8,c2-c8) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/loechner5.c b/cloog-core/test/reservoir/loechner5.c new file mode 100644 index 0000000..3ba1f5b --- /dev/null +++ b/cloog-core/test/reservoir/loechner5.c @@ -0,0 +1,12 @@ +/* Generated from ../../../git/cloog/test/./reservoir/loechner5.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +if (M >= 1) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + for (c6=1;c6<=M;c6++) { + for (c8=1;c8<=M;c8++) { + S1(c4,c6,c2,c8) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/loechner5.cloog b/cloog-core/test/reservoir/loechner5.cloog new file mode 100755 index 0000000..f208435 --- /dev/null +++ b/cloog-core/test/reservoir/loechner5.cloog @@ -0,0 +1,44 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +1 + +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+m >= 0, j-1 >= 0, -j+m >= 0, k-1 >= 0, -k+m >= 0, l-1 >= 0, -l+m >= 0, 1 >= 0 } + + 9 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 0 1 0 + 1 0 1 0 0 0 -1 + 1 0 -1 0 0 1 0 + 1 0 0 1 0 0 -1 + 1 0 0 -1 0 1 0 + 1 0 0 0 1 0 -1 + 1 0 0 0 -1 1 0 + 1 0 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +1 + + 10 16 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/loechner5.good.c b/cloog-core/test/reservoir/loechner5.good.c new file mode 100644 index 0000000..937c118 --- /dev/null +++ b/cloog-core/test/reservoir/loechner5.good.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/./reservoir/loechner5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6, c8; + /* Original iterators. */ + int i, j, k, l; + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + for (c6=1;c6<=M;c6++) { + for (c8=1;c8<=M;c8++) { + S1(c4,c6,c2,c8) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-interp.c b/cloog-core/test/reservoir/mg-interp.c new file mode 100644 index 0000000..75b1cd0 --- /dev/null +++ b/cloog-core/test/reservoir/mg-interp.c @@ -0,0 +1,217 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-interp.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.30s. */ +if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,1,c6); + } + if (N == 2) { + for (c6=1;c6<=M-1;c6++) { + S6(c2,1,c6); + S7(c2,1,c6); + } + } + if (N >= 3) { + for (c6=1;c6<=M-1;c6++) { + S6(c2,1,c6); + S7(c2,1,c6); + } + } + if (N == 2) { + for (c6=1;c6<=M;c6++) { + S3(c2,1,c6); + } + } + if (N == 2) { + for (c6=1;c6<=M-1;c6++) { + S11(c2,1,c6); + } + } + if (N >= 3) { + for (c6=1;c6<=M;c6++) { + S3(c2,1,c6); + } + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6); + } + } + if (N == 3) { + for (c6=1;c6<=M-1;c6++) { + S6(c2,2,c6); + S7(c2,2,c6); + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,1,c6); + } + } + if (N >= 4) { + for (c6=1;c6<=M-1;c6++) { + S6(c2,2,c6); + S7(c2,2,c6); + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,1,c6); + } + } + for (c4=3;c4<=2*N-5;c4++) { + for (c6=1;c6<=M-1;c6++) { + if ((c4+1)%2 == 0) { + S10(c2,(c4-1)/2,c6); + } + } + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + S3(c2,(c4+1)/2,c6); + } + } + for (c6=1;c6<=M-1;c6++) { + if (c4%2 == 0) { + S6(c2,(c4+2)/2,c6); + S7(c2,(c4+2)/2,c6); + } + if ((c4+1)%2 == 0) { + S1(c2,(c4+3)/2,c6); + } + } + if ((c4+1)%2 == 0) { + S1(c2,(c4+3)/2,M); + } + for (c6=1;c6<=M-1;c6++) { + if (c4%2 == 0) { + S11(c2,c4/2,c6); + } + } + } + if (N >= 4) { + for (c6=1;c6<=M-1;c6++) { + S6(c2,N-1,c6); + S7(c2,N-1,c6); + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,N-2,c6); + } + } + if (N >= 3) { + for (c6=1;c6<=M-1;c6++) { + S10(c2,N-2,c6); + } + for (c6=1;c6<=M;c6++) { + S3(c2,N-1,c6); + } + } + if (N >= 3) { + for (c6=1;c6<=M-1;c6++) { + S11(c2,N-1,c6); + } + } + for (c6=1;c6<=M-1;c6++) { + S10(c2,N-1,c6); + } + } +} +if ((M == 1) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + S1(c2,1,1); + for (c4=1;c4<=2*N-5;c4++) { + if ((c4+1)%2 == 0) { + S3(c2,(c4+1)/2,1); + } + if ((c4+1)%2 == 0) { + S1(c2,(c4+3)/2,1); + } + } + S3(c2,N-1,1); + } +} +if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S2(c2,1,c6); + } + for (c6=1;c6<=M-1;c6++) { + S8(c2,1,c6); + } + for (c4=3;c4<=2*N-2;c4++) { + for (c6=1;c6<=M;c6++) { + if (c4%2 == 0) { + S2(c2,c4/2,c6); + } + } + for (c6=1;c6<=M-1;c6++) { + if (c4%2 == 0) { + S8(c2,c4/2,c6); + } + } + for (c6=1;c6<=M-1;c6++) { + if ((c4+1)%2 == 0) { + S9(c2,(c4-1)/2,c6); + } + } + } + for (c6=1;c6<=M-1;c6++) { + S9(c2,N-1,c6); + } + } +} +if ((M == 1) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=2;c4<=2*N-2;c4++) { + if (c4%2 == 0) { + S2(c2,c4/2,1); + } + } + } +} +if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S4(c2,c4,c6); + } + } + } +} +if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S5(c2,c4,c6); + } + } + } +} +if ((M >= P+1) && (N >= Q+1)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S12(c2,c4,c6); + } + } + } +} +if ((M >= 2) && (N >= Q+1)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S13(c2,c4,c6); + } + } + } +} +if ((M >= P+1) && (N >= 2)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S14(c2,c4,c6); + } + } + } +} +if ((M >= 2) && (N >= 2)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S15(c2,c4,c6); + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-interp.cloog b/cloog-core/test/reservoir/mg-interp.cloog new file mode 100755 index 0000000..9d08463 --- /dev/null +++ b/cloog-core/test/reservoir/mg-interp.cloog @@ -0,0 +1,376 @@ +# Language +c + +# Context + + 1 11 + 1 0 0 0 0 0 0 0 0 0 1 +0 + +# Number of statments +15 + +1 +# { (i,j,k,l,m,n,o,p,q,r,s,t) | i-1 >= 0, -i+n-1 >= 0, j-1 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } + + 7 14 + 1 1 0 0 0 0 0 0 0 0 0 0 0 -1 + 1 -1 0 0 0 0 1 0 0 0 0 0 0 -1 + 1 0 1 0 0 0 0 0 0 0 0 0 0 -1 + 1 0 -1 0 0 1 0 0 0 0 0 0 0 -1 + 1 0 0 1 0 0 0 0 0 0 0 0 0 -1 + 1 0 0 -1 1 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,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mg-interp.good.c new file mode 100644 index 0000000..7f919c8 --- /dev/null +++ b/cloog-core/test/reservoir/mg-interp.good.c @@ -0,0 +1,318 @@ +/* Generated from ../../../git/cloog/test/./reservoir/mg-interp.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 1.01s. */ +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); } +#define S6(i,j,k) { hash(6); hash(i); hash(j); hash(k); } +#define S7(i,j,k) { hash(7); hash(i); hash(j); hash(k); } +#define S8(i,j,k) { hash(8); hash(i); hash(j); hash(k); } +#define S9(i,j,k) { hash(9); hash(i); hash(j); hash(k); } +#define S10(i,j,k) { hash(10); hash(i); hash(j); hash(k); } +#define S11(i,j,k) { hash(11); hash(i); hash(j); hash(k); } +#define S12(i,j,k) { hash(12); hash(i); hash(j); hash(k); } +#define S13(i,j,k) { hash(13); hash(i); hash(j); hash(k); } +#define S14(i,j,k) { hash(14); hash(i); hash(j); hash(k); } +#define S15(i,j,k) { hash(15); hash(i); hash(j); hash(k); } + +void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M >= 2) && (N >= 4)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S6(c2,1,c6) ; + S7(c2,1,c6) ; + } + for (c6=1;c6<=M;c6++) { + S3(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S1(c2,2,c6) ; + } + S1(c2,2,M) ; + for (c6=1;c6<=M-1;c6++) { + S6(c2,2,c6) ; + S7(c2,2,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,1,c6) ; + } + for (c4=3;c4<=2*N-5;c4++) { + for (c6=1;c6<=M-1;c6++) { + if ((c4+1)%2 == 0) { + j = (c4-1)/2 ; + S10(c2,(c4-1)/2,c6) ; + } + } + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S3(c2,(c4+1)/2,c6) ; + } + } + for (c6=1;c6<=M-1;c6++) { + if (c4%2 == 0) { + j = (c4+2)/2 ; + S6(c2,(c4+2)/2,c6) ; + S7(c2,(c4+2)/2,c6) ; + } + if ((c4+1)%2 == 0) { + j = (c4+3)/2 ; + S1(c2,(c4+3)/2,c6) ; + } + } + if ((c4+1)%2 == 0) { + j = (c4+3)/2 ; + S1(c2,(c4+3)/2,M) ; + } + for (c6=1;c6<=M-1;c6++) { + if (c4%2 == 0) { + S11(c2,c4/2,c6) ; + } + } + } + c4 = 2*N-4 ; + for (c6=1;c6<=M-1;c6++) { + j = N-1 ; + S6(c2,N-1,c6) ; + S7(c2,N-1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + j = N-2 ; + S11(c2,N-2,c6) ; + } + c4 = 2*N-3 ; + for (c6=1;c6<=M-1;c6++) { + j = N-2 ; + S10(c2,N-2,c6) ; + } + for (c6=1;c6<=M;c6++) { + j = N-1 ; + S3(c2,N-1,c6) ; + } + c4 = 2*N-2 ; + for (c6=1;c6<=M-1;c6++) { + j = N-1 ; + S11(c2,N-1,c6) ; + } + c4 = 2*N-1 ; + for (c6=1;c6<=M-1;c6++) { + j = N-1 ; + S10(c2,N-1,c6) ; + } + } + } + if ((M >= 2) && (N == 3)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S6(c2,1,c6) ; + S7(c2,1,c6) ; + } + for (c6=1;c6<=M;c6++) { + S3(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S1(c2,2,c6) ; + } + S1(c2,2,M) ; + for (c6=1;c6<=M-1;c6++) { + S6(c2,2,c6) ; + S7(c2,2,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S10(c2,1,c6) ; + } + for (c6=1;c6<=M;c6++) { + S3(c2,2,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,2,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S10(c2,2,c6) ; + } + } + } + if ((M >= 2) && (N == 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S6(c2,1,c6) ; + S7(c2,1,c6) ; + } + for (c6=1;c6<=M;c6++) { + S3(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S11(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S10(c2,1,c6) ; + } + } + } + if ((M == 1) && (N >= 3)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=-1;c4<=0;c4++) { + if ((c4+1)%2 == 0) { + j = (c4+3)/2 ; + S1(c2,(c4+3)/2,1) ; + } + } + for (c4=1;c4<=2*N-5;c4++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S3(c2,(c4+1)/2,1) ; + } + if ((c4+1)%2 == 0) { + j = (c4+3)/2 ; + S1(c2,(c4+3)/2,1) ; + } + } + for (c4=2*N-4;c4<=2*N-3;c4++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S3(c2,(c4+1)/2,1) ; + } + } + } + } + if ((M == 1) && (N == 2)) { + for (c2=1;c2<=O-1;c2++) { + S1(c2,1,1) ; + S3(c2,1,1) ; + } + } + if ((M >= 2) && (N >= 3)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S2(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S8(c2,1,c6) ; + } + for (c4=3;c4<=2*N-2;c4++) { + for (c6=1;c6<=M;c6++) { + if (c4%2 == 0) { + S2(c2,c4/2,c6) ; + } + } + for (c6=1;c6<=M-1;c6++) { + if (c4%2 == 0) { + S8(c2,c4/2,c6) ; + } + } + for (c6=1;c6<=M-1;c6++) { + if ((c4+1)%2 == 0) { + j = (c4-1)/2 ; + S9(c2,(c4-1)/2,c6) ; + } + } + } + c4 = 2*N-1 ; + for (c6=1;c6<=M-1;c6++) { + j = N-1 ; + S9(c2,N-1,c6) ; + } + } + } + if ((M >= 2) && (N == 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S2(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S8(c2,1,c6) ; + } + for (c6=1;c6<=M-1;c6++) { + S9(c2,1,c6) ; + } + } + } + if ((M == 1) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=2;c4<=2*N-2;c4++) { + if (c4%2 == 0) { + S2(c2,c4/2,1) ; + } + } + } + } + if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S4(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S5(c2,c4,c6) ; + } + } + } + } + if ((M >= P+1) && (N >= Q+1)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S12(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= Q+1)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S13(c2,c4,c6) ; + } + } + } + } + if ((M >= P+1) && (N >= 2)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S14(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= 2)) { + for (c2=R;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S15(c2,c4,c6) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-interp2.c b/cloog-core/test/reservoir/mg-interp2.c new file mode 100644 index 0000000..688cc91 --- /dev/null +++ b/cloog-core/test/reservoir/mg-interp2.c @@ -0,0 +1,39 @@ +/* Generated from ../../../git/cloog/test/./reservoir/mg-interp2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.11s. */ +if (O >= 2) { + if ((M >= P+1) && (N >= Q+1)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S1(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= Q+1)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S2(c2,c4,c6) ; + } + } + } + } + if ((M >= P+1) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S3(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S4(c2,c4,c6) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-interp2.cloog b/cloog-core/test/reservoir/mg-interp2.cloog new file mode 100755 index 0000000..d1218bc --- /dev/null +++ b/cloog-core/test/reservoir/mg-interp2.cloog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 0 -1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 21 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 21 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/mg-interp2.good.c b/cloog-core/test/reservoir/mg-interp2.good.c new file mode 100644 index 0000000..2e1f365 --- /dev/null +++ b/cloog-core/test/reservoir/mg-interp2.good.c @@ -0,0 +1,57 @@ +/* Generated from ../../../git/cloog/test/./reservoir/mg-interp2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.07s. */ +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); } + +void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M >= P+1) && (N >= Q+1)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S1(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= Q+1)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=Q;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S2(c2,c4,c6) ; + } + } + } + } + if ((M >= P+1) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=P;c6<=M-1;c6++) { + S3(c2,c4,c6) ; + } + } + } + } + if ((M >= 2) && (N >= 2)) { + for (c2=1;c2<=O-1;c2++) { + for (c4=1;c4<=N-1;c4++) { + for (c6=1;c6<=M-1;c6++) { + S4(c2,c4,c6) ; + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-psinv.c b/cloog-core/test/reservoir/mg-psinv.c new file mode 100644 index 0000000..a0447e1 --- /dev/null +++ b/cloog-core/test/reservoir/mg-psinv.c @@ -0,0 +1,39 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-psinv.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.02s. */ +if ((M >= 1) && (N >= 3) && (O >= 3)) { + if (M >= 3) { + for (c2=2;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6); + S2(c2,2,c6); + } + for (c4=4;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + S1(c2,(c4+1)/2,c6); + S2(c2,(c4+1)/2,c6); + } + } + for (c6=2;c6<=M-1;c6++) { + if (c4%2 == 0) { + S3(c2,c4/2,c6); + } + } + } + for (c6=2;c6<=M-1;c6++) { + S3(c2,N-1,c6); + } + } + } + if (M <= 2) { + for (c2=2;c2<=O-1;c2++) { + for (c4=3;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + S1(c2,(c4+1)/2,c6); + S2(c2,(c4+1)/2,c6); + } + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-psinv.cloog b/cloog-core/test/reservoir/mg-psinv.cloog new file mode 100755 index 0000000..7f0dd2c --- /dev/null +++ b/cloog-core/test/reservoir/mg-psinv.cloog @@ -0,0 +1,88 @@ +# Language +c + +# Context + + 1 5 + 1 0 0 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } + + 7 8 + 1 1 0 0 0 0 0 -2 + 1 -1 0 0 0 0 1 -1 + 1 0 1 0 0 0 0 -2 + 1 0 -1 0 0 1 0 -1 + 1 0 0 1 0 0 0 -1 + 1 0 0 -1 1 0 0 0 + 1 0 0 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l,m,n) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } + + 7 8 + 1 1 0 0 0 0 0 -2 + 1 -1 0 0 0 0 1 -1 + 1 0 1 0 0 0 0 -2 + 1 0 -1 0 0 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 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/mg-psinv.good.c b/cloog-core/test/reservoir/mg-psinv.good.c new file mode 100644 index 0000000..cb5b57c --- /dev/null +++ b/cloog-core/test/reservoir/mg-psinv.good.c @@ -0,0 +1,71 @@ +/* Generated from ../../../git/cloog/test/./reservoir/mg-psinv.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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); } + +void test(int M, int N, int O) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M >= 3) && (N >= 4)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6) ; + S2(c2,2,c6) ; + } + for (c4=4;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S1(c2,(c4+1)/2,c6) ; + S2(c2,(c4+1)/2,c6) ; + } + } + for (c6=2;c6<=M-1;c6++) { + if (c4%2 == 0) { + S3(c2,c4/2,c6) ; + } + } + } + c4 = 2*N-2 ; + for (c6=2;c6<=M-1;c6++) { + j = N-1 ; + S3(c2,N-1,c6) ; + } + } + } + if ((M >= 3) && (N == 3)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6) ; + S2(c2,2,c6) ; + } + for (c6=2;c6<=M-1;c6++) { + S3(c2,2,c6) ; + } + } + } + if ((M >= 1) && (M <= 2) && (N >= 3)) { + for (c2=2;c2<=O-1;c2++) { + for (c4=3;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S1(c2,(c4+1)/2,c6) ; + S2(c2,(c4+1)/2,c6) ; + } + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-resid.c b/cloog-core/test/reservoir/mg-resid.c new file mode 100644 index 0000000..89a3cda --- /dev/null +++ b/cloog-core/test/reservoir/mg-resid.c @@ -0,0 +1,39 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-resid.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.03s. */ +if ((M >= 1) && (N >= 3) && (O >= 3)) { + if (M >= 3) { + for (c2=2;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6); + S2(c2,2,c6); + } + for (c4=4;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + S1(c2,(c4+1)/2,c6); + S2(c2,(c4+1)/2,c6); + } + } + for (c6=2;c6<=M-1;c6++) { + if (c4%2 == 0) { + S3(c2,c4/2,c6); + } + } + } + for (c6=2;c6<=M-1;c6++) { + S3(c2,N-1,c6); + } + } + } + if (M <= 2) { + for (c2=2;c2<=O-1;c2++) { + for (c4=3;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + S1(c2,(c4+1)/2,c6); + S2(c2,(c4+1)/2,c6); + } + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-resid.cloog b/cloog-core/test/reservoir/mg-resid.cloog new file mode 100755 index 0000000..7f0dd2c --- /dev/null +++ b/cloog-core/test/reservoir/mg-resid.cloog @@ -0,0 +1,88 @@ +# Language +c + +# Context + + 1 5 + 1 0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8 15 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 1 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 15 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -2 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/mg-resid.good.c b/cloog-core/test/reservoir/mg-resid.good.c new file mode 100644 index 0000000..4056aab --- /dev/null +++ b/cloog-core/test/reservoir/mg-resid.good.c @@ -0,0 +1,71 @@ +/* Generated from ../../../git/cloog/test/./reservoir/mg-resid.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.05s. */ +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); } + +void test(int M, int N, int O) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if ((M >= 3) && (N >= 4)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6) ; + S2(c2,2,c6) ; + } + for (c4=4;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S1(c2,(c4+1)/2,c6) ; + S2(c2,(c4+1)/2,c6) ; + } + } + for (c6=2;c6<=M-1;c6++) { + if (c4%2 == 0) { + S3(c2,c4/2,c6) ; + } + } + } + c4 = 2*N-2 ; + for (c6=2;c6<=M-1;c6++) { + j = N-1 ; + S3(c2,N-1,c6) ; + } + } + } + if ((M >= 3) && (N == 3)) { + for (c2=2;c2<=O-1;c2++) { + for (c6=1;c6<=M;c6++) { + S1(c2,2,c6) ; + S2(c2,2,c6) ; + } + for (c6=2;c6<=M-1;c6++) { + S3(c2,2,c6) ; + } + } + } + if ((M >= 1) && (M <= 2) && (N >= 3)) { + for (c2=2;c2<=O-1;c2++) { + for (c4=3;c4<=2*N-3;c4++) { + for (c6=1;c6<=M;c6++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S1(c2,(c4+1)/2,c6) ; + S2(c2,(c4+1)/2,c6) ; + } + } + } + } + } +} diff --git a/cloog-core/test/reservoir/mg-rprj3.c b/cloog-core/test/reservoir/mg-rprj3.c new file mode 100644 index 0000000..f7f7a4d --- /dev/null +++ b/cloog-core/test/reservoir/mg-rprj3.c @@ -0,0 +1,47 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/mg-rprj3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.10s. */ +if ((M >= 2) && (N >= 3) && (O >= 3)) { + if (M >= 3) { + 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++) { + S2(c2,c4-1,c6); + } + S4(c2,c4-1,2); + for (c6=2;c6<=M-2;c6++) { + S3(c2,c4-1,c6); + S5(c2,c4-1,c6); + S4(c2,c4-1,c6+1); + } + S3(c2,c4-1,M-1); + S5(c2,c4-1,M-1); + for (c6=2;c6<=M;c6++) { + S1(c2,c4,c6); + } + } + for (c6=2;c6<=M;c6++) { + S2(c2,N-1,c6); + } + S4(c2,N-1,2); + for (c6=2;c6<=M-2;c6++) { + S3(c2,N-1,c6); + S5(c2,N-1,c6); + S4(c2,N-1,c6+1); + } + S3(c2,N-1,M-1); + S5(c2,N-1,M-1); + } + } + if (M == 2) { + for (c2=2;c2<=O-1;c2++) { + S1(c2,2,2); + for (c4=3;c4<=N-1;c4++) { + S2(c2,c4-1,2); + S1(c2,c4,2); + } + S2(c2,N-1,2); + } + } +} diff --git a/cloog-core/test/reservoir/mg-rprj3.cloog b/cloog-core/test/reservoir/mg-rprj3.cloog new file mode 100755 index 0000000..adf72fd --- /dev/null +++ b/cloog-core/test/reservoir/mg-rprj3.cloog @@ -0,0 +1,136 @@ +# Language +c + +# Context + + 1 8 + 1 0 0 0 0 0 0 1 +0 + +# Number of statments +5 + +1 +# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l >= 0, 1 >= 0 } + + 7 11 + 1 1 0 0 0 0 0 0 0 0 -2 + 1 -1 0 0 0 0 1 0 0 0 -1 + 1 0 1 0 0 0 0 0 0 0 -2 + 1 0 -1 0 0 1 0 0 0 0 -1 + 1 0 0 1 0 0 0 0 0 0 -2 + 1 0 0 -1 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l,m,n,o,p,q) | i-2 >= 0, -i+n-1 >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+l >= 0, 1 >= 0 } + + 7 11 + 1 1 0 0 0 0 0 0 0 0 -2 + 1 -1 0 0 0 0 1 0 0 0 -1 + 1 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 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 1 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -2 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 18 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 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) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali1.c b/cloog-core/test/reservoir/pingali1.c new file mode 100644 index 0000000..505df8d --- /dev/null +++ b/cloog-core/test/reservoir/pingali1.c @@ -0,0 +1,21 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/pingali1.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.01s. */ +if ((M >= 1) && (N >= 1)) { + if (N >= 2) { + for (c2=1;c2<=M;c2++) { + S2(c2,1); + for (c4=3;c4<=2*N-1;c4++) { + for (c6=max(1,c4-N);c6<=floord(c4-1,2);c6++) { + S1(c2,c4-c6,c6); + } + if ((c4+1)%2 == 0) { + S2(c2,(c4+1)/2); + } + } + } + } + if (N == 1) { + for (c2=1;c2<=M;c2++) { + S2(c2,1); + } + } +} diff --git a/cloog-core/test/reservoir/pingali1.cloog b/cloog-core/test/reservoir/pingali1.cloog new file mode 100755 index 0000000..0be0a2a --- /dev/null +++ b/cloog-core/test/reservoir/pingali1.cloog @@ -0,0 +1,61 @@ +# Language +c + +# Context + + 1 4 + 1 0 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, -j+m >= 0, k-1 >= 0, j-k-1 >= 0, 1 >= 0 } + + 6 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 1 0 0 + 1 0 -1 0 0 1 0 + 1 0 0 1 0 0 -1 + 1 0 1 -1 0 0 -1 + 1 0 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+l >= 0, 1 >= 0 } + + 5 6 + 1 1 0 0 0 -1 + 1 -1 0 1 0 0 + 1 0 1 0 0 -1 + 1 0 -1 0 1 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 8 14 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -2 0 0 1 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/pingali1.good.c b/cloog-core/test/reservoir/pingali1.good.c new file mode 100644 index 0000000..b72eb17 --- /dev/null +++ b/cloog-core/test/reservoir/pingali1.good.c @@ -0,0 +1,44 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if (N >= 2) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=2;c4++) { + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S2(c2,(c4+1)/2) ; + } + } + for (c4=3;c4<=2*N-1;c4++) { + for (c6=max(1,c4-N);c6<=floord(c4-1,2);c6++) { + j = c4-c6 ; + S1(c2,c4-c6,c6) ; + } + if ((c4+1)%2 == 0) { + j = (c4+1)/2 ; + S2(c2,(c4+1)/2) ; + } + } + } + } + if (N == 1) { + for (c2=1;c2<=M;c2++) { + S2(c2,1) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali2.c b/cloog-core/test/reservoir/pingali2.c new file mode 100644 index 0000000..b09c4f9 --- /dev/null +++ b/cloog-core/test/reservoir/pingali2.c @@ -0,0 +1,13 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (M >= 1) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali2.cloog b/cloog-core/test/reservoir/pingali2.cloog new file mode 100755 index 0000000..0f89038 --- /dev/null +++ b/cloog-core/test/reservoir/pingali2.cloog @@ -0,0 +1,56 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + + + 6 10 + 0 1 0 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/pingali2.good.c b/cloog-core/test/reservoir/pingali2.good.c new file mode 100644 index 0000000..9341731 --- /dev/null +++ b/cloog-core/test/reservoir/pingali2.good.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali3.c b/cloog-core/test/reservoir/pingali3.c new file mode 100644 index 0000000..b53542a --- /dev/null +++ b/cloog-core/test/reservoir/pingali3.c @@ -0,0 +1,15 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali3.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (M >= 1) { + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + for (c6=1;c6<=M;c6++) { + S2(c2,c4,c6) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/pingali3.cloog b/cloog-core/test/reservoir/pingali3.cloog new file mode 100755 index 0000000..8f345c0 --- /dev/null +++ b/cloog-core/test/reservoir/pingali3.cloog @@ -0,0 +1,62 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | i-1 >= 0, -i+l >= 0, j-1 >= 0, -j+l >= 0, k-1 >= 0, -k+l >= 0, 1 >= 0 } + + 7 6 + 1 1 0 0 0 -1 + 1 -1 0 0 1 0 + 1 0 1 0 0 -1 + 1 0 -1 0 1 0 + 1 0 0 1 0 -1 + 1 0 0 -1 1 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 8 12 + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 1 + + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/pingali3.good.c b/cloog-core/test/reservoir/pingali3.good.c new file mode 100644 index 0000000..5b5e4a9 --- /dev/null +++ b/cloog-core/test/reservoir/pingali3.good.c @@ -0,0 +1,31 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + for (c6=1;c6<=M;c6++) { + S2(c2,c4,c6) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/pingali4.c b/cloog-core/test/reservoir/pingali4.c new file mode 100644 index 0000000..9905699 --- /dev/null +++ b/cloog-core/test/reservoir/pingali4.c @@ -0,0 +1,11 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali4.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } +} +for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2,c4) ; + } +} diff --git a/cloog-core/test/reservoir/pingali4.cloog b/cloog-core/test/reservoir/pingali4.cloog new file mode 100755 index 0000000..46f4e07 --- /dev/null +++ b/cloog-core/test/reservoir/pingali4.cloog @@ -0,0 +1,57 @@ +# Language +c + +# Context + + 2 3 + 1 1 -2 + 1 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | i-1 >= 0, -i+k >= 0, j-1 >= 0, -j+k >= 0, 1 >= 0 } + + 5 5 + 1 1 0 0 -1 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 0 -1 1 0 + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + + + 6 10 + 0 1 0 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/pingali4.good.c b/cloog-core/test/reservoir/pingali4.good.c new file mode 100644 index 0000000..5b61707 --- /dev/null +++ b/cloog-core/test/reservoir/pingali4.good.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali4.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4; + /* Original iterators. */ + int i, j; + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S1(c2,c4) ; + } + } + for (c2=1;c2<=M;c2++) { + for (c4=1;c4<=M;c4++) { + S2(c2,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali5.c b/cloog-core/test/reservoir/pingali5.c new file mode 100644 index 0000000..1b2c415 --- /dev/null +++ b/cloog-core/test/reservoir/pingali5.c @@ -0,0 +1,21 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/pingali5.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.02s. */ +if (M >= 2) { + for (c2=3;c2<=2*M-3;c2++) { + for (c4=ceild(c2+3,2);c4<=M;c4++) { + for (i=ceild(c2+1,2);i<=min(c2-1,c4-1);i++) { + S1(i,c2-i,c4); + } + } + for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { + S2(c2-c4,c4); + } + for (c4=ceild(c2+3,2);c4<=M;c4++) { + for (i=ceild(c2+1,2);i<=min(c2-1,c4-1);i++) { + S3(i,c2-i,c4); + } + } + } + for (c2=max(M+1,2*M-2);c2<=2*M-1;c2++) { + S2(M,c2-M); + } +} diff --git a/cloog-core/test/reservoir/pingali5.cloog b/cloog-core/test/reservoir/pingali5.cloog new file mode 100755 index 0000000..2933d75 --- /dev/null +++ b/cloog-core/test/reservoir/pingali5.cloog @@ -0,0 +1,81 @@ +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statments +3 + +1 +# { (i,j,k,l) | j-1 >= 0, i-j-1 >= 0, -i+k-1 >= 0, -k+l >= 0, 1 >= 0 } + + 5 6 + 1 0 1 0 0 -1 + 1 1 -1 0 0 -1 + 1 -1 0 1 0 -1 + 1 0 0 -1 1 0 + 1 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k) | -i+k >= 0, j-1 >= 0, i-j-1 >= 0, 1 >= 0 } + + 4 5 + 1 -1 0 1 0 + 1 0 1 0 -1 + 1 1 -1 0 -1 + 1 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l) | j-1 >= 0, i-j-1 >= 0, -i+k-1 >= 0, -k+l >= 0, 1 >= 0 } + + 5 6 + 1 0 1 0 0 -1 + 1 1 -1 0 0 -1 + 1 -1 0 1 0 -1 + 1 0 0 -1 1 0 + 1 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +3 + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 12 + 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -1 0 0 + 0 0 0 1 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 -1 + 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 1 + + + 8 13 + 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -1 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 -2 + 0 0 0 0 1 0 0 0 0 0 -1 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 -2 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/pingali5.good.c b/cloog-core/test/reservoir/pingali5.good.c new file mode 100644 index 0000000..351e5d3 --- /dev/null +++ b/cloog-core/test/reservoir/pingali5.good.c @@ -0,0 +1,44 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali5.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ +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) { hash(2); hash(i); hash(j); } +#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } + +void test(int M) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + for (c2=3;c2<=2*M-3;c2++) { + for (c4=ceild(c2+3,2);c4<=M;c4++) { + for (i=ceild(c2+1,2);i<=min(c4-1,c2-1);i++) { + j = c2-i ; + S1(i,c2-i,c4) ; + } + } + for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { + i = c2-c4 ; + S2(c2-c4,c4) ; + } + for (c4=ceild(c2+3,2);c4<=M;c4++) { + for (i=ceild(c2+1,2);i<=min(c4-1,c2-1);i++) { + j = c2-i ; + S3(i,c2-i,c4) ; + } + } + } + for (c2=max(2*M-2,3);c2<=2*M-1;c2++) { + for (c4=max(1,c2-M);c4<=floord(c2-1,2);c4++) { + i = c2-c4 ; + S2(c2-c4,c4) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali6.c b/cloog-core/test/reservoir/pingali6.c new file mode 100644 index 0000000..5ce4a85 --- /dev/null +++ b/cloog-core/test/reservoir/pingali6.c @@ -0,0 +1,29 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali6.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.04s. */ +if (N >= 3) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S1(1,c4,c6) ; + } + } + for (c2=3;c2<=2*M;c2++) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if (c2%2 == 0) { + S1(c2/2,c4,c6) ; + } + } + } + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if ((c2+1)%2 == 0) { + S2((c2-1)/2,c4,c6) ; + } + } + } + } + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S2(M,c4,c6) ; + } + } +} diff --git a/cloog-core/test/reservoir/pingali6.cloog b/cloog-core/test/reservoir/pingali6.cloog new file mode 100755 index 0000000..93726ec --- /dev/null +++ b/cloog-core/test/reservoir/pingali6.cloog @@ -0,0 +1,66 @@ +# Language +c + +# Context + + 3 4 + 1 1 0 -1 + 1 0 1 -1 + 1 0 0 1 +0 + +# Number of statments +2 + +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } + + 7 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 1 0 0 + 1 0 1 0 0 0 -2 + 1 0 -1 0 0 1 -1 + 1 0 0 1 0 0 -2 + 1 0 0 -1 0 1 -1 + 1 0 0 0 0 0 1 + +0 0 0 +1 +# { (i,j,k,l,m) | i-1 >= 0, -i+l >= 0, j-2 >= 0, -j+m-1 >= 0, k-2 >= 0, -k+m-1 >= 0, 1 >= 0 } + + 7 7 + 1 1 0 0 0 0 -1 + 1 -1 0 0 1 0 0 + 1 0 1 0 0 0 -2 + 1 0 -1 0 0 1 -1 + 1 0 0 1 0 0 -2 + 1 0 0 -1 0 1 -1 + 1 0 0 0 0 0 1 + +0 0 0 +0 +# Scattering functions +2 + + 8 14 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -2 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + + + 8 14 + 0 1 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 -2 0 0 0 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/pingali6.good.c b/cloog-core/test/reservoir/pingali6.good.c new file mode 100644 index 0000000..26e9831 --- /dev/null +++ b/cloog-core/test/reservoir/pingali6.good.c @@ -0,0 +1,53 @@ +/* Generated from ../../../git/cloog/test/./reservoir/pingali6.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.03s. */ +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); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int c2, c4, c6; + /* Original iterators. */ + int i, j, k; + if (N >= 3) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S1(1,c4,c6) ; + } + } + } + if (N >= 3) { + for (c2=3;c2<=2*M;c2++) { + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if (c2%2 == 0) { + S1(c2/2,c4,c6) ; + } + } + } + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + if ((c2+1)%2 == 0) { + i = (c2-1)/2 ; + S2((c2-1)/2,c4,c6) ; + } + } + } + } + } + if (N >= 3) { + c2 = 2*M+1 ; + for (c4=2;c4<=N-1;c4++) { + for (c6=2;c6<=N-1;c6++) { + S2(M,c4,c6) ; + } + } + } +} diff --git a/cloog-core/test/reservoir/stride.c b/cloog-core/test/reservoir/stride.c new file mode 100644 index 0000000..e22c74b --- /dev/null +++ b/cloog-core/test/reservoir/stride.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/reservoir/stride.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (M >= 2) { + for (c2=2;c2<=M;c2+=7) { + S1(c2,(c2-2)/7) ; + } +} diff --git a/cloog-core/test/reservoir/stride.cloog b/cloog-core/test/reservoir/stride.cloog new file mode 100644 index 0000000..760a1a6 --- /dev/null +++ b/cloog-core/test/reservoir/stride.cloog @@ -0,0 +1,45 @@ +# +# Stride-bug: +# +# for (i = 2; i <= N; i+=7) { +# S(i); +# +# becomes: +# +# for (i = 5; i <= N; i+=7) { +# S(i); + +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statements +1 + +1 + + 4 5 + 0 1 -7 0 -2 + 1 1 0 0 -2 + 1 -1 0 1 0 + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +1 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/stride2.c b/cloog-core/test/reservoir/stride2.c new file mode 100644 index 0000000..fbeb7bc --- /dev/null +++ b/cloog-core/test/reservoir/stride2.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/reservoir/stride2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +if (M >= 0) { + for (c2=2;c2<=M;c2+=7) { + S1(c2,(c2-2)/7) ; + } +} diff --git a/cloog-core/test/reservoir/stride2.cloog b/cloog-core/test/reservoir/stride2.cloog new file mode 100644 index 0000000..5fb9b14 --- /dev/null +++ b/cloog-core/test/reservoir/stride2.cloog @@ -0,0 +1,45 @@ +# +# Stride-bug: +# +# for (i = 2; i <= N; i+=7) { +# S(i); +# +# becomes: +# +# for (i = 5; i <= N; i+=7) { +# S(i); + +# Language +c + +# Context + + 1 3 + 1 0 1 +0 + +# Number of statements +1 + +1 + + 4 5 + 0 1 -7 0 -2 # i - 7j = 2 + 1 1 0 0 0 # i >= 0 + 1 -1 0 1 0 # i <= n + 1 0 0 0 1 + +0 0 0 +0 +# Scattering functions +1 + + 6 10 + 0 1 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 -1 0 0 0 + 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 + 1 0 0 0 0 0 0 0 0 1 + +0 diff --git a/cloog-core/test/reservoir/tang-xue1.c b/cloog-core/test/reservoir/tang-xue1.c new file mode 100644 index 0000000..7dd0610 --- /dev/null +++ b/cloog-core/test/reservoir/tang-xue1.c @@ -0,0 +1,14 @@ +/* Generated from ../../../git/cloog/test/reservoir/tang-xue1.cloog by CLooG 0.14.0-165-g01eb246 gmp bits in 0.01s. */ +for (c2=0;c2<=9;c2++) { + for (c4=max(-1,c2-9);c4<=min(4,c2+3);c4++) { + for (c6=max(max(1,c2),c2-c4);c6<=min(min(9,c2+1),c2-c4+4);c6++) { + for (c8=max(1,-c2+c4+c6);c8<=min(4,-c2+c4+c6+1);c8++) { + if (c2%2 == 0) { + if (c4%2 == 0) { + S1(c2/2,(-c2+c4)/2,-c2+c6,-c4+c8); + } + } + } + } + } +} diff --git a/cloog-core/test/reservoir/tang-xue1.cloog b/cloog-core/test/reservoir/tang-xue1.cloog new file mode 100644 index 0000000..bf9b92b --- /dev/null +++ b/cloog-core/test/reservoir/tang-xue1.cloog @@ -0,0 +1,80 @@ +# +# Example 1 in "Generating Efficient Tiled Code for Distributed Memory +# Machines", Peiyi Tang and Jingling Xue. +# + +# for (int i = 1; i <= 9; i++) { +# for (int j = 1; j <= 4; j++) { +# A[i,2*j] = A[i,2*j-2] + A[i-1,2*j-2]; +# } +# } +# +# We tile it with a tiling matrix H = [1/2 0] +# [-1/2 1/2] +# +# We get: +# +# for (int i = 0; i <= 9; i += 2) { +# for (int j = max(-1, -9 + i); j <= min(4, 3 + i); j++) { +# for (int k = max(1, i, i-j); k <= min(4 + i -j, 1 + i, 9); k++) { +# for (int l = max(-i + j + k, 1); l <= min(4, 1 -i + j + k); l++) { +# if (i % 2 == 0) { +# if ((i + j) % 2 == 0) { +# A[k, 2 * l] = A[k, -2 + 2 * l] + A[-1 + k, -2 + 2 * l]; +# } +# } +# } +# } +# } +# } +# + +# language: C +c + +# parameter (none) +1 2 +# 1 +1 1 +0 + +1 # number of statements + +1 +# -2i-2j -l +4 >= 0 +# -k +l >= 0 +# -2i -k +9 >= 0 +# k >= 0 +# 2i +k -1 >= 0 +# k -l +1 >= 0 +# -k +1 >= 0 +# 2i+2j +l-1 >= 0 +8 6 +# i j k l 1 +1 -2 -2 0 -1 4 +1 0 0 -1 1 0 +1 -2 0 -1 0 9 +1 0 0 1 0 0 +1 2 0 1 0 -1 +1 0 0 1 -1 1 +1 0 0 -1 0 1 +1 2 2 0 1 -1 +0 0 0 +0 + +1 + +# Scattering functions +9 15 +# alpha=[2i, 2i+2j, 2i+k, 2i+2j+l] gamma=[0, 0, 0, 0] beta=[0, 0, 0, 0, 0, 0] +# c1 c2 c3 c4 c5 c6 c7 c8 c9 i j k l 1 +0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 -1 0 0 0 0 0 0 0 2 0 0 0 0 +0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 -1 0 0 0 0 0 2 2 0 0 0 +0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 -1 0 0 0 2 0 1 0 0 +0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 -1 0 2 2 0 1 0 +0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 +0 diff --git a/cloog-core/test/reservoir/tang-xue1.good.c b/cloog-core/test/reservoir/tang-xue1.good.c new file mode 100644 index 0000000..1c4215c --- /dev/null +++ b/cloog-core/test/reservoir/tang-xue1.good.c @@ -0,0 +1,34 @@ +/* Generated from ../../../git/cloog/test/./reservoir/tang-xue1.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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,l) { hash(1); hash(i); hash(j); hash(k); hash(l); } + +void test() +{ + /* Scattering iterators. */ + int c2, c4, c6, c8; + /* Original iterators. */ + int i, j, k, l; + for (c2=0;c2<=9;c2++) { + for (c4=max(-1,c2-9);c4<=min(4,c2+3);c4++) { + for (c6=max(max(c2,1),c2-c4);c6<=min(min(c2+1,9),c2-c4+4);c6++) { + for (c8=max(1,-c2+c4+c6);c8<=min(4,-c2+c4+c6+1);c8++) { + if (c2%2 == 0) { + if ((c2+c4)%2 == 0) { + j = (-c2+c4)/2 ; + k = -c2+c6 ; + l = -c4+c8 ; + S1(c2/2,(-c2+c4)/2,-c2+c6,-c4+c8) ; + } + } + } + } + } + } +} diff --git a/cloog-core/test/reservoir/two.c b/cloog-core/test/reservoir/two.c new file mode 100644 index 0000000..374e754 --- /dev/null +++ b/cloog-core/test/reservoir/two.c @@ -0,0 +1,2 @@ +/* Generated from /home/skimo/git/cloog/test/./reservoir/two.cloog by CLooG 0.14.0-225-g6e2d019 gmp bits in 0.00s. */ +S1(1,1,5); diff --git a/cloog-core/test/reservoir/two.cloog b/cloog-core/test/reservoir/two.cloog new file mode 100644 index 0000000..60b259f --- /dev/null +++ b/cloog-core/test/reservoir/two.cloog @@ -0,0 +1,26 @@ +# Scan +# D = { (i, j, k) | 0 <= i < 10, 1 <= j < 20, 2i + 3j = k, i + j + 3 = 3k } +# +# language: C +c + +# parameter (none) +1 2 +1 1 +0 + +1 # Number of statements + +1 +6 5 +# i j k 1 +1 1 0 0 0 +1 -1 0 0 10 +1 0 1 0 -1 +1 0 -1 0 20 +0 2 3 -1 0 +0 1 1 -1 3 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/reservoir/two.good.c b/cloog-core/test/reservoir/two.good.c new file mode 100644 index 0000000..a80671f --- /dev/null +++ b/cloog-core/test/reservoir/two.good.c @@ -0,0 +1,23 @@ +/* Generated from ../../../git/cloog/test/./reservoir/two.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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); } + +void test() +{ + /* Original iterators. */ + int i, j, k; + for (i=0;i<=1;i++) { + if ((i+1)%2 == 0) { + j = (-i+3)/2 ; + k = (i+9)/2 ; + S1(i,(-i+3)/2,(i+9)/2) ; + } + } +} diff --git a/cloog-core/test/singleton.c b/cloog-core/test/singleton.c new file mode 100644 index 0000000..ad14ebe --- /dev/null +++ b/cloog-core/test/singleton.c @@ -0,0 +1,3 @@ +/* Generated from /home/skimo/git/cloog/test/singleton.cloog by CLooG 0.14.0-242-g720faff gmp bits in 0.00s. */ +S2(); +S1(); diff --git a/cloog-core/test/singleton.cloog b/cloog-core/test/singleton.cloog new file mode 100644 index 0000000..8636efb --- /dev/null +++ b/cloog-core/test/singleton.cloog @@ -0,0 +1,27 @@ +c + +0 2 + +0 + +2 + +1 +0 2 +0 0 0 + +1 +0 2 +0 0 0 + +0 + +2 + +1 3 +0 -1 0 + +1 3 +0 -1 -1 + +0 diff --git a/cloog-core/test/singleton.good.c b/cloog-core/test/singleton.good.c new file mode 100644 index 0000000..40106ed --- /dev/null +++ b/cloog-core/test/singleton.good.c @@ -0,0 +1,17 @@ +/* Generated from /home/skimo/git/cloog/test/singleton.cloog by CLooG 0.14.0-242-g720faff gmp bits in 0.00s. */ +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() { hash(1); } +#define S2() { hash(2); } + +void test() +{ + S2(); + S1(); +} diff --git a/cloog-core/test/sor1d.c b/cloog-core/test/sor1d.c new file mode 100644 index 0000000..da1b5ec --- /dev/null +++ b/cloog-core/test/sor1d.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/sor1d.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.11s. */ +if ((M >= 1) && (N >= 3)) { + for (glT1=-1;glT1<=floord(3*M+N-5,100);glT1++) { + for (rp1=max(max(0,ceild(100*glT1-2*M-N+5,100)),ceild(100*glT1-N-193,300));rp1<=min(min(floord(glT1+1,3),floord(M,100)),glT1);rp1++) { + for (vT1=max(max(100*glT1-100*rp1,200*rp1-3),200*rp1-N+1);vT1<=min(min(min(2*M+N-5,100*glT1-100*rp1+99),200*rp1+N+193),100*glT1-100*rp1+N+95);vT1++) { + if (rp1 >= max(1,ceild(vT1-N+7,200))) { + S3(glT1-rp1,rp1-1,rp1,100*rp1-1,-200*rp1+vT1+6); + } + for (vP1=max(max(1,ceild(vT1-N+5,2)),100*rp1);vP1<=min(min(floord(vT1+2,2),M),100*rp1+99);vP1++) { + S1(glT1-rp1,rp1,vP1,vT1-2*vP1+4); + } + if (rp1 <= min(floord(M-100,100),floord(vT1-197,200))) { + S2(glT1-rp1,rp1,rp1+1,100*rp1+99,-200*rp1+vT1-194); + } + } + } + S4(glT1); + } +} diff --git a/cloog-core/test/sor1d.cloog b/cloog-core/test/sor1d.cloog new file mode 100644 index 0000000..ba1ca70 --- /dev/null +++ b/cloog-core/test/sor1d.cloog @@ -0,0 +1,256 @@ +# created: Thu Dec 17 16:41:33 CET 2009 +# ---------------------- CONTEXT ---------------------- +c # language is C + +# Context +2 4 + 1 1 0 0 + 1 0 1 0 + + +1 # set parameter names +M N + +# --------------------- STATEMENTS -------------------- +4 + +# 1 computation stmts: +1 # domains per statement +19 8 + 1 -100 0 2 1 0 0 -4 + 1 0 0 0 1 0 0 -2 + 1 100 0 -2 -1 0 0 103 + 1 0 0 0 -1 0 1 -1 + 1 0 0 1 0 0 0 -1 + 1 0 -100 1 0 0 0 0 + 1 -100 0 2 0 0 1 -5 + 1 0 0 -1 0 1 0 0 + 1 0 100 -1 0 0 0 99 + 1 100 0 -2 0 0 0 101 + 1 0 50 0 0 0 0 49 + 1 -100 200 0 0 0 1 193 + 1 0 -100 0 0 1 0 0 + 1 100 -200 0 0 0 0 101 + 1 100 0 0 0 0 0 99 + 1 -100 0 0 0 2 1 -5 + 1 0 0 0 0 0 1 -3 + 1 0 0 0 0 2 1 94 + 1 0 0 0 0 1 0 -1 + + +0 0 0 # for future options... + + +# 1 prepare-send stmts: +1 # domains per statement +57 9 + 1 0 -200 0 2 1 0 0 -3 + 1 0 0 0 2 1 0 0 -5 + 1 -100 0 0 2 1 0 0 -4 + 1 0 0 0 0 1 0 0 -3 + 1 0 200 0 -2 -1 0 1 197 + 1 0 0 0 -2 -1 2 1 -3 + 1 100 0 0 -2 -1 0 0 103 + 1 0 0 0 0 -1 0 1 -1 + 1 0 0 -100 1 0 0 0 1 + 1 0 -100 0 1 0 0 0 0 + 1 0 0 0 1 0 0 0 -1 + 1 0 -200 0 2 0 0 1 -4 + 1 0 0 0 2 0 0 1 -6 + 1 -100 0 0 2 0 0 1 -5 + 1 0 0 100 -1 0 0 0 98 + 1 0 100 0 -1 0 0 0 99 + 1 0 0 0 -1 0 1 0 -1 + 1 0 200 0 -2 0 0 1 194 + 1 0 0 0 -2 0 2 1 -6 + 1 50 0 0 -1 0 0 0 50 + 1 0 -1 1 0 0 0 0 -1 + 1 0 0 100 0 0 0 0 97 + 1 0 -200 200 0 0 0 1 192 + 1 0 0 200 0 0 0 1 190 + 1 -100 0 200 0 0 0 1 191 + 1 0 1 -1 0 0 0 0 1 + 1 0 0 -100 0 0 1 0 0 + 1 0 200 -200 0 0 0 1 196 + 1 0 0 -200 0 0 2 1 -4 + 1 50 0 -100 0 0 0 0 51 + 1 -100 200 0 0 0 0 2 189 + 1 -100 200 0 0 0 0 1 193 + 1 0 100 0 0 0 0 1 94 + 1 0 200 0 0 0 0 1 192 + 1 0 50 0 0 0 0 0 49 + 1 100 -200 0 0 0 0 1 96 + 1 0 -100 0 0 0 1 1 -5 + 1 0 -100 0 0 0 1 0 -100 + 1 0 -200 0 0 0 2 1 -204 + 1 50 -100 0 0 0 0 0 -49 + 1 50 0 0 0 0 0 0 49 + 1 100 0 0 0 0 0 1 94 + 1 100 0 0 0 0 0 3 284 + 1 50 0 0 0 0 0 1 45 + 1 -100 0 0 0 0 2 1 -7 + 1 -100 0 0 0 0 2 2 -11 + 1 -100 0 0 0 0 2 4 179 + 1 -100 0 0 0 0 2 3 -15 + 1 0 0 0 0 0 2 1 -8 + 1 0 0 0 0 0 2 3 -16 + 1 0 0 0 0 0 1 1 -6 + 1 0 0 0 0 0 0 1 -4 + 1 0 0 0 0 0 2 4 79 + 1 0 0 0 0 0 2 7 463 + 1 0 0 0 0 0 2 6 269 + 1 0 0 0 0 0 2 5 75 + 1 0 0 0 0 0 1 0 -2 + + +0 0 0 # for future options... + + +# 1 prepare-receive stmts: +1 # domains per statement +57 9 + 1 0 -200 0 2 1 0 0 -3 + 1 0 0 0 2 1 0 0 -5 + 1 -100 0 0 2 1 0 0 -4 + 1 0 0 0 0 1 0 0 -3 + 1 0 200 0 -2 -1 0 1 197 + 1 0 0 0 -2 -1 2 1 -3 + 1 100 0 0 -2 -1 0 0 103 + 1 0 0 0 0 -1 0 1 -1 + 1 0 0 -100 1 0 0 0 1 + 1 0 -100 0 1 0 0 0 0 + 1 0 0 0 1 0 0 0 -1 + 1 0 -200 0 2 0 0 1 -4 + 1 0 0 0 2 0 0 1 -6 + 1 -100 0 0 2 0 0 1 -5 + 1 0 0 100 -1 0 0 0 98 + 1 0 100 0 -1 0 0 0 99 + 1 0 0 0 -1 0 1 0 -1 + 1 0 200 0 -2 0 0 1 194 + 1 0 0 0 -2 0 2 1 -6 + 1 50 0 0 -1 0 0 0 50 + 1 0 -1 1 0 0 0 0 -1 + 1 0 0 100 0 0 0 0 97 + 1 0 -200 200 0 0 0 1 192 + 1 0 0 200 0 0 0 1 190 + 1 -100 0 200 0 0 0 1 191 + 1 0 1 -1 0 0 0 0 1 + 1 0 0 -100 0 0 1 0 0 + 1 0 200 -200 0 0 0 1 196 + 1 0 0 -200 0 0 2 1 -4 + 1 50 0 -100 0 0 0 0 51 + 1 -100 200 0 0 0 0 2 189 + 1 -100 200 0 0 0 0 1 193 + 1 0 100 0 0 0 0 1 94 + 1 0 200 0 0 0 0 1 192 + 1 0 50 0 0 0 0 0 49 + 1 100 -200 0 0 0 0 1 96 + 1 0 -100 0 0 0 1 1 -5 + 1 0 -100 0 0 0 1 0 -100 + 1 0 -200 0 0 0 2 1 -204 + 1 50 -100 0 0 0 0 0 -49 + 1 50 0 0 0 0 0 0 49 + 1 100 0 0 0 0 0 1 94 + 1 100 0 0 0 0 0 3 284 + 1 50 0 0 0 0 0 1 45 + 1 -100 0 0 0 0 2 1 -7 + 1 -100 0 0 0 0 2 2 -11 + 1 -100 0 0 0 0 2 4 179 + 1 -100 0 0 0 0 2 3 -15 + 1 0 0 0 0 0 2 1 -8 + 1 0 0 0 0 0 2 3 -16 + 1 0 0 0 0 0 1 1 -6 + 1 0 0 0 0 0 0 1 -4 + 1 0 0 0 0 0 2 4 79 + 1 0 0 0 0 0 2 7 463 + 1 0 0 0 0 0 2 6 269 + 1 0 0 0 0 0 2 5 75 + 1 0 0 0 0 0 1 0 -2 + + +0 0 0 # for future options... + + +# 1 communication stmts: +1 # domains per statement +21 5 + 1 200 0 3 781 + 1 200 0 1 391 + 1 200 0 4 1075 + 1 100 0 1 392 + 1 100 0 0 197 + 1 -200 6 5 377 + 1 -200 6 6 671 + 1 -100 3 2 190 + 1 -200 6 3 -13 + 1 -100 3 1 -5 + 1 0 2 3 484 + 1 0 1 1 95 + 1 0 3 1 192 + 1 0 3 5 873 + 1 0 3 2 189 + 1 0 6 7 1062 + 1 0 6 5 771 + 1 0 3 4 579 + 1 0 0 1 -3 + 1 0 2 1 -5 + 1 0 1 0 -1 + + +0 0 0 # for future options... + + + +1 # set the iterator names +tileT1 tileP1 other1 other2 other3 other4 other5 + +# --------------------- SCATTERING -------------------- +4 # Scattering functions +9 17 + 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 -2 -1 0 0 4 + 0 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 + +9 18 + 0 1 0 -1 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -1 0 0 4 + 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 -2 + 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 + +9 18 + 0 1 0 0 0 0 0 -1 0 0 -1 0 0 0 0 0 0 -1 + 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 0 -2 -1 0 0 4 + 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 + 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 -1 + +9 14 + 0 1 0 0 0 0 0 0 0 0 -1 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 0 -1 + 0 0 0 1 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 1 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 1 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 1 0 0 0 0 + + +1 # we set the scattering dimension names +glT1 bl rp1 vT1 vP1 stmtType otherP1 arrAcc1 arrNr1 + diff --git a/cloog-core/test/sor1d.good.c b/cloog-core/test/sor1d.good.c new file mode 100644 index 0000000..bb5d643 --- /dev/null +++ b/cloog-core/test/sor1d.good.c @@ -0,0 +1,39 @@ +/* Generated from /home/skimo/git/cloog/test/sor1d.cloog by CLooG 0.14.0-226-g3fc65ac gmp bits in 0.04s. */ +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(tileT1,tileP1,other1,other2) { hash(1); hash(tileT1); hash(tileP1); hash(other1); hash(other2); } +#define S2(tileT1,tileP1,other1,other2,other3) { hash(2); hash(tileT1); hash(tileP1); hash(other1); hash(other2); hash(other3); } +#define S3(tileT1,tileP1,other1,other2,other3) { hash(3); hash(tileT1); hash(tileP1); hash(other1); hash(other2); hash(other3); } +#define S4(tileT1) { hash(4); hash(tileT1); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int glT1, rp1, vT1, vP1, otherP1, arrAcc1; + /* Original iterators. */ + int tileT1, tileP1, other1, other2, other3; + if ((M >= 1) && (N >= 3)) { + for (glT1=-1;glT1<=floord(3*M+N-5,100);glT1++) { + for (rp1=max(max(0,ceild(100*glT1-2*M-N+5,100)),ceild(100*glT1-N-193,300));rp1<=min(min(min(min(floord(glT1+1,2),floord(M,100)),floord(100*glT1+99,100)),floord(50*glT1+51,150)),floord(100*glT1+N+98,300));rp1++) { + for (vT1=max(max(max(max(0,100*glT1-100*rp1),100*rp1-1),200*rp1-3),200*rp1-N+1);vT1<=min(min(2*M+N-5,100*glT1-100*rp1+99),200*rp1+N+193);vT1++) { + if (rp1 >= max(1,ceild(vT1-N+7,200))) { + S3(glT1-rp1,rp1-1,rp1,100*rp1-1,-200*rp1+vT1+6); + } + for (vP1=max(max(1,ceild(vT1-N+5,2)),100*rp1);vP1<=min(min(floord(vT1+2,2),M),100*rp1+99);vP1++) { + S1(glT1-rp1,rp1,vP1,vT1-2*vP1+4); + if ((rp1 <= min(floord(M-100,100),floord(vT1-197,200))) && (100*rp1 == vP1-99)) { + S2(glT1-rp1,rp1,rp1+1,100*rp1+99,-200*rp1+vT1-194); + } + } + } + } + S4(glT1); + } + } +} diff --git a/cloog-core/test/square+triangle-1-1-2-3.c b/cloog-core/test/square+triangle-1-1-2-3.c new file mode 100644 index 0000000..c30b4e2 --- /dev/null +++ b/cloog-core/test/square+triangle-1-1-2-3.c @@ -0,0 +1,14 @@ +/* Generated from /home/skimo/git/cloog/test/square+triangle-1-1-2-3.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.00s. */ +for (j=1;j<=M;j++) { + S1(1,j); +} +for (i=2;i<=M;i++) { + S1(i,1); + for (j=2;j<=i;j++) { + S1(i,j); + S2(i,j); + } + for (j=i+1;j<=M;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/square+triangle-1-1-2-3.cloog b/cloog-core/test/square+triangle-1-1-2-3.cloog new file mode 100644 index 0000000..ce8f547 --- /dev/null +++ b/cloog-core/test/square+triangle-1-1-2-3.cloog @@ -0,0 +1,36 @@ +# language: C +c + +# Context +# {M | M >= 1} +2 3 +# M 1 +1 1 -1 +1 0 1 +0 + +2 # Number of statements + +1 +# {i, j | 1<=i<=M; 1<=j<=M} +5 5 +# i j M 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 0 1 0 -1 +1 0 -1 1 0 +1 0 0 0 1 +0 0 0 + +1 +# {i, j | 2<=j<=i<=M} +4 5 +# i j M 1 +1 0 1 0 -2 +1 1 -1 0 0 +1 -1 0 1 0 +1 0 0 0 1 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/square+triangle-1-1-2-3.good.c b/cloog-core/test/square+triangle-1-1-2-3.good.c new file mode 100644 index 0000000..ea68a7f --- /dev/null +++ b/cloog-core/test/square+triangle-1-1-2-3.good.c @@ -0,0 +1,37 @@ +/* Generated from ../../../git/cloog/test/square+triangle-1-1-2-3.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M) +{ + /* Original iterators. */ + int i, j; + for (j=1;j<=M;j++) { + S1(1,j) ; + } + for (i=2;i<=M-1;i++) { + S1(i,1) ; + for (j=2;j<=i;j++) { + S1(i,j) ; + S2(i,j) ; + } + for (j=i+1;j<=M;j++) { + S1(i,j) ; + } + } + if (M >= 2) { + S1(M,1) ; + for (j=2;j<=M;j++) { + S1(M,j) ; + S2(M,j) ; + } + } +} diff --git a/cloog-core/test/stride.c b/cloog-core/test/stride.c new file mode 100644 index 0000000..d2cf8fe --- /dev/null +++ b/cloog-core/test/stride.c @@ -0,0 +1,9 @@ +/* Generated from stride.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.01s. */ +for (c1=3;c1<=100;c1++) { + if (c1 == 25) { + S1(25); + } + if (c1%3 == 0) { + S2(c1,c1/3); + } +} diff --git a/cloog-core/test/stride.cloog b/cloog-core/test/stride.cloog new file mode 100644 index 0000000..1526377 --- /dev/null +++ b/cloog-core/test/stride.cloog @@ -0,0 +1,32 @@ +c + +0 2 + +0 + +2 + +1 +1 3 +0 -1 25 +-1 0 0 + +1 +3 4 +1 1 0 -3 +1 -1 0 100 +0 1 -3 0 +0 0 0 + +0 + +2 +2 5 +0 -1 0 1 0 +0 0 -1 0 0 + +2 6 +0 -1 0 1 0 0 +0 0 -1 0 1 0 + +0 diff --git a/cloog-core/test/stride.good.c b/cloog-core/test/stride.good.c new file mode 100644 index 0000000..7380723 --- /dev/null +++ b/cloog-core/test/stride.good.c @@ -0,0 +1,27 @@ +/* Generated from stride.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test() +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j; + for (c1=3;c1<=100;c1++) { + if (c1 == 25) { + S1(25); + } + if (c1%3 == 0) { + S2(c1,c1/3); + } + } +} diff --git a/cloog-core/test/stride2.c b/cloog-core/test/stride2.c new file mode 100644 index 0000000..320a2fb --- /dev/null +++ b/cloog-core/test/stride2.c @@ -0,0 +1,7 @@ +/* Generated from stride2.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ +for (c1=3;c1<=100;c1+=3) { + if (c1 == 27) { + S1(27); + } + S2(c1,c1/3); +} diff --git a/cloog-core/test/stride2.cloog b/cloog-core/test/stride2.cloog new file mode 100644 index 0000000..72a597a --- /dev/null +++ b/cloog-core/test/stride2.cloog @@ -0,0 +1,32 @@ +c + +0 2 + +0 + +2 + +1 +1 3 +0 -1 27 +-1 0 0 + +1 +3 4 +1 1 0 -3 +1 -1 0 100 +0 1 -3 0 +0 0 0 + +0 + +2 +2 5 +0 -1 0 1 0 +0 0 -1 0 0 + +2 6 +0 -1 0 1 0 0 +0 0 -1 0 1 0 + +0 diff --git a/cloog-core/test/stride2.good.c b/cloog-core/test/stride2.good.c new file mode 100644 index 0000000..4cf8b60 --- /dev/null +++ b/cloog-core/test/stride2.good.c @@ -0,0 +1,25 @@ +/* Generated from stride2.cloog by CLooG 0.14.0-200-g26bdb56 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test() +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j; + for (c1=3;c1<=100;c1+=3) { + if (c1 == 27) { + S1(27); + } + S2(c1,c1/3); + } +} diff --git a/cloog-core/test/stride3.c b/cloog-core/test/stride3.c new file mode 100644 index 0000000..c228cb6 --- /dev/null +++ b/cloog-core/test/stride3.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/stride3.cloog by CLooG 0.14.0-291-g5879c32 gmp bits in 0.00s. */ +if ((m <= n) && (n >= 1)) { + for (p1=max(50,50*m);p1<=50*n;p1+=50) { + S1(p1/50); + } +} diff --git a/cloog-core/test/stride3.cloog b/cloog-core/test/stride3.cloog new file mode 100644 index 0000000..bd5d6b0 --- /dev/null +++ b/cloog-core/test/stride3.cloog @@ -0,0 +1,41 @@ + + +# ---------------------- CONTEXT ---------------------- +c # language is C + +# Context (no constraints on two parameters) +1 4 # 1 lines and 4 columns +# eq/in m n 1 +1 0 0 0 # 0 >= 0, always true + +1 # We want to set manually the parameter names +m n # parameter names + +# --------------------- STATEMENTS -------------------- +1 # Number of statements + +1 # First statement: two domains +# First domain +3 5 # 3 lines and 5 columns +# eq/in i m n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # i <= n +1 1 -1 0 0 # i >= m +# Second domain +0 0 0 # for future options + + +1 # We want to set manually the iterator names +i j # iterator names + +# --------------------- SCATTERING -------------------- +1 # Scattering functions +# First function +2 7 # 2 lines and 7 columns +# eq/in p1 p2 i m n 1 +0 1 0 -50 0 0 0 # p1 = i +0 0 1 0 0 0 0 # p2 = 0 + +1 # We want to set manually the scattering dimension names +p1 p2 # scattering dimension names + diff --git a/cloog-core/test/stride4.c b/cloog-core/test/stride4.c new file mode 100644 index 0000000..2e874be --- /dev/null +++ b/cloog-core/test/stride4.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/stride4.cloog by CLooG 0.16.0-10-g13c6274 gmp bits in 0.00s. */ +if ((t >= 0) && (t <= 15)) { + for (i0=t;i0<=99;i0+=16) { + S1(i0,t); + } +} diff --git a/cloog-core/test/stride4.cloog b/cloog-core/test/stride4.cloog new file mode 100644 index 0000000..0271d97 --- /dev/null +++ b/cloog-core/test/stride4.cloog @@ -0,0 +1,33 @@ +# Language: C +c + +# Context: +1 + +0 3 0 0 0 1 + +1 # Parameter name(s) +t +# Statement number: +1 + +# Iteration domain of statement 1. +1 + +6 6 2 0 1 1 +0 1 0 16 -1 0 +0 0 1 0 -1 0 +1 1 0 0 0 0 +1 -1 0 0 0 99 +1 0 0 0 1 0 +1 0 0 0 -1 15 + +0 0 0 # For future options. + + +1 # Iterator name(s) + +i0 i1 + +# No scattering functions. +0 diff --git a/cloog-core/test/swim.c b/cloog-core/test/swim.c new file mode 100644 index 0000000..de721bb --- /dev/null +++ b/cloog-core/test/swim.c @@ -0,0 +1,672 @@ +/* Generated from ../../../git/cloog/test/swim.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.51s. */ +if (M == 1) { + S1() ; + S2() ; + S3() ; + S4() ; + S5() ; + S6() ; + S7() ; + S8() ; + S9() ; + S10() ; + S11() ; + S12() ; + S13() ; + S14() ; + S15() ; + S16() ; + S17() ; + S18() ; + S19() ; + S20() ; + S21() ; + S22() ; + S23() ; + S24() ; + S25() ; + S26() ; + S27() ; + for (p1=1;p1<=N;p1++) { + for (p3=1;p3<=N;p3++) { + S28(p1,p3) ; + S29(p1,p3) ; + S30(p1,p3) ; + } + S31(p1) ; + } + S32() ; + S33() ; + S34() ; + if (O <= 1) { + S35() ; + } + S36() ; + S37() ; + if ((N >= 1) && (Q >= 1) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S40(p1,p3,p5) ; + S41(p1,p3,p5) ; + S42(p1,p3,p5) ; + S43(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S59(p1,p3,p5) ; + S60(p1,p3,p5) ; + S61(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S102(p1,p3,p5) ; + S103(p1,p3,p5) ; + S104(p1,p3,p5) ; + S105(p1,p3,p5) ; + S106(p1,p3,p5) ; + S107(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N <= 0) && (Q >= 1) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S40(p1,p3,p5) ; + S41(p1,p3,p5) ; + S42(p1,p3,p5) ; + S43(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S59(p1,p3,p5) ; + S60(p1,p3,p5) ; + S61(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S102(p1,p3,p5) ; + S103(p1,p3,p5) ; + S104(p1,p3,p5) ; + S105(p1,p3,p5) ; + S106(p1,p3,p5) ; + S107(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N >= 1) && (Q <= 0) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N <= 0) && (Q <= 0) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N >= 1) && (Q >= 1) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N <= 0) && (Q >= 1) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N >= 1) && (Q <= 0) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((N <= 0) && (Q <= 0) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } +} diff --git a/cloog-core/test/swim.cloog b/cloog-core/test/swim.cloog new file mode 100644 index 0000000..9216e46 --- /dev/null +++ b/cloog-core/test/swim.cloog @@ -0,0 +1,2453 @@ +c # language is C +# ---------- CONTEXT ---------- +# Context (no constraints on parameters) +1 8 # 1 lines, 8 columns +0 0 0 0 0 0 0 0 + +0 # Automatically find parameter names + +# ---------- STATEMENTS ---------- +125 # Number of statements + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +7 10 +1 1 0 0 0 0 0 0 0 -1 +1 -1 0 0 1 0 0 0 0 0 +1 0 1 0 0 0 0 0 0 -1 +1 0 -1 0 1 0 0 0 0 0 +1 0 0 1 0 0 0 0 0 -1 +1 0 0 -1 0 0 0 0 0 1 +1 0 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +7 10 +1 1 0 0 0 0 0 0 0 -1 +1 -1 0 0 1 0 0 0 0 0 +1 0 1 0 0 0 0 0 0 -1 +1 0 -1 0 1 0 0 0 0 0 +1 0 0 1 0 0 0 0 0 -1 +1 0 0 -1 0 0 0 0 0 1 +1 0 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +7 10 +1 1 0 0 0 0 0 0 0 -1 +1 -1 0 0 1 0 0 0 0 0 +1 0 1 0 0 0 0 0 0 -1 +1 0 -1 0 1 0 0 0 0 0 +1 0 0 1 0 0 0 0 0 -1 +1 0 0 -1 0 0 0 0 0 1 +1 0 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -1 +1 -1 0 1 0 0 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +4 8 +1 0 0 -1 0 0 0 1 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +3 8 +1 1 0 0 0 0 0 -1 +1 -1 0 0 0 0 0 1 +1 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +9 11 +1 1 0 0 0 0 0 0 0 0 -2 +1 -1 0 0 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 0 0 +1 0 0 1 0 0 0 0 0 0 -1 +1 0 0 -1 0 0 0 0 0 1 0 +1 0 0 0 1 0 0 0 0 0 -1 +1 0 0 0 -1 0 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 1 0 0 0 0 0 0 0 -2 +1 -1 0 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 0 +1 0 0 1 0 0 0 0 0 -1 +1 0 0 -1 0 0 0 0 0 1 +1 0 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 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+1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1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+0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +1 # Statement has 1 domain +5 9 +1 1 0 0 0 0 0 0 -2 +1 -1 0 0 0 1 0 0 0 +1 0 1 0 0 0 0 0 -1 +1 0 -1 0 0 0 0 0 1 +1 0 -1 0 0 0 0 0 1 +0 0 0 + +0 # Automatically find iterator names. + +# ---------- SCATTERING FUNCTIONS ---------- +125 # Number of scattering functions + +7 15 +# p0 p1 p2 p3 p4 p5 p6 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3 + +7 15 +# p0 p1 p2 p3 p4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0 0 # Alpha & Gamma 3 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 + +7 16 +# p0 p1 p2 p3 p4 p5 p6 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 -34 # Beta 0 +0 0 1 0 0 0 0 0 -1 0 0 0 0 0 0 0 # Alpha & Gamma 1 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -54 # Beta 1 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 # Beta 2 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 3 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Beta 3 + +1 # Set the scattering parameter names. +p0 p1 p2 p3 p4 p5 p6 + diff --git a/cloog-core/test/swim.good.c b/cloog-core/test/swim.good.c new file mode 100644 index 0000000..80f0de1 --- /dev/null +++ b/cloog-core/test/swim.good.c @@ -0,0 +1,819 @@ +/* Generated from ../../../git/cloog/test/swim.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.70s. */ +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() { hash(1); } +#define S2() { hash(2); } +#define S3() { hash(3); } +#define S4() { hash(4); } +#define S5() { hash(5); } +#define S6() { hash(6); } +#define S7() { hash(7); } +#define S8() { hash(8); } +#define S9() { hash(9); } +#define S10() { hash(10); } +#define S11() { hash(11); } +#define S12() { hash(12); } +#define S13() { hash(13); } +#define S14() { hash(14); } +#define S15() { hash(15); } +#define S16() { hash(16); } +#define S17() { hash(17); } +#define S18() { hash(18); } +#define S19() { hash(19); } +#define S20() { hash(20); } +#define S21() { hash(21); } +#define S22() { hash(22); } +#define S23() { hash(23); } +#define S24() { hash(24); } +#define S25() { hash(25); } +#define S26() { hash(26); } +#define S27() { hash(27); } +#define S28(i,j) { hash(28); hash(i); hash(j); } +#define S29(i,j) { hash(29); hash(i); hash(j); } +#define S30(i,j) { hash(30); hash(i); hash(j); } +#define S31(i) { hash(31); hash(i); } +#define S32() { hash(32); } +#define S33() { hash(33); } +#define S34() { hash(34); } +#define S35() { hash(35); } +#define S36() { hash(36); } +#define S37() { hash(37); } +#define S38(i) { hash(38); hash(i); } +#define S39(i) { hash(39); hash(i); } +#define S40(i,j,k) { hash(40); hash(i); hash(j); hash(k); } +#define S41(i,j,k) { hash(41); hash(i); hash(j); hash(k); } +#define S42(i,j,k) { hash(42); hash(i); hash(j); hash(k); } +#define S43(i,j,k) { hash(43); hash(i); hash(j); hash(k); } +#define S44(i,j) { hash(44); hash(i); hash(j); } +#define S45(i,j) { hash(45); hash(i); hash(j); } +#define S46(i,j) { hash(46); hash(i); hash(j); } +#define S47(i,j) { hash(47); hash(i); hash(j); } +#define S48(i,j) { hash(48); hash(i); hash(j); } +#define S49(i,j) { hash(49); hash(i); hash(j); } +#define S50(i,j) { hash(50); hash(i); hash(j); } +#define S51(i,j) { hash(51); hash(i); hash(j); } +#define S52(i) { hash(52); hash(i); } +#define S53(i) { hash(53); hash(i); } +#define S54(i) { hash(54); hash(i); } +#define S55(i) { hash(55); hash(i); } +#define S56(i) { hash(56); hash(i); } +#define S57(i) { hash(57); hash(i); } +#define S58(i) { hash(58); hash(i); } +#define S59(i,j,k) { hash(59); hash(i); hash(j); hash(k); } +#define S60(i,j,k) { hash(60); hash(i); hash(j); hash(k); } +#define S61(i,j,k) { hash(61); hash(i); hash(j); hash(k); } +#define S62(i,j) { hash(62); hash(i); hash(j); } +#define S63(i,j) { hash(63); hash(i); hash(j); } +#define S64(i,j) { hash(64); hash(i); hash(j); } +#define S65(i,j) { hash(65); hash(i); hash(j); } +#define S66(i,j) { hash(66); hash(i); hash(j); } +#define S67(i,j) { hash(67); hash(i); hash(j); } +#define S68(i) { hash(68); hash(i); } +#define S69(i) { hash(69); hash(i); } +#define S70(i) { hash(70); hash(i); } +#define S71(i) { hash(71); hash(i); } +#define S72(i) { hash(72); hash(i); } +#define S73(i) { hash(73); hash(i); } +#define S74(i) { hash(74); hash(i); } +#define S75(i) { hash(75); hash(i); } +#define S76(i) { hash(76); hash(i); } +#define S77(i) { hash(77); hash(i); } +#define S78(i) { hash(78); hash(i); } +#define S79(i) { hash(79); hash(i); } +#define S80(i) { hash(80); hash(i); } +#define S81(i) { hash(81); hash(i); } +#define S82(i) { hash(82); hash(i); } +#define S83(i) { hash(83); hash(i); } +#define S84(i) { hash(84); hash(i); } +#define S85(i) { hash(85); hash(i); } +#define S86(i) { hash(86); hash(i); } +#define S87(i) { hash(87); hash(i); } +#define S88(i) { hash(88); hash(i); } +#define S89(i) { hash(89); hash(i); } +#define S90(i) { hash(90); hash(i); } +#define S91(i) { hash(91); hash(i); } +#define S92(i) { hash(92); hash(i); } +#define S93(i) { hash(93); hash(i); } +#define S94(i) { hash(94); hash(i); } +#define S95(i,j,k) { hash(95); hash(i); hash(j); hash(k); } +#define S96(i,j,k) { hash(96); hash(i); hash(j); hash(k); } +#define S97(i,j,k) { hash(97); hash(i); hash(j); hash(k); } +#define S98(i,j) { hash(98); hash(i); hash(j); } +#define S99(i) { hash(99); hash(i); } +#define S100(i) { hash(100); hash(i); } +#define S101(i) { hash(101); hash(i); } +#define S102(i,j,k) { hash(102); hash(i); hash(j); hash(k); } +#define S103(i,j,k) { hash(103); hash(i); hash(j); hash(k); } +#define S104(i,j,k) { hash(104); hash(i); hash(j); hash(k); } +#define S105(i,j,k) { hash(105); hash(i); hash(j); hash(k); } +#define S106(i,j,k) { hash(106); hash(i); hash(j); hash(k); } +#define S107(i,j,k) { hash(107); hash(i); hash(j); hash(k); } +#define S108(i,j) { hash(108); hash(i); hash(j); } +#define S109(i,j) { hash(109); hash(i); hash(j); } +#define S110(i,j) { hash(110); hash(i); hash(j); } +#define S111(i,j) { hash(111); hash(i); hash(j); } +#define S112(i,j) { hash(112); hash(i); hash(j); } +#define S113(i,j) { hash(113); hash(i); hash(j); } +#define S114(i,j) { hash(114); hash(i); hash(j); } +#define S115(i,j) { hash(115); hash(i); hash(j); } +#define S116(i,j) { hash(116); hash(i); hash(j); } +#define S117(i,j) { hash(117); hash(i); hash(j); } +#define S118(i,j) { hash(118); hash(i); hash(j); } +#define S119(i,j) { hash(119); hash(i); hash(j); } +#define S120(i) { hash(120); hash(i); } +#define S121(i) { hash(121); hash(i); } +#define S122(i) { hash(122); hash(i); } +#define S123(i) { hash(123); hash(i); } +#define S124(i) { hash(124); hash(i); } +#define S125(i) { hash(125); hash(i); } + +void test(int M, int N, int O, int P, int Q, int R) +{ + /* Scattering iterators. */ + int p1, p3, p5; + /* Original iterators. */ + int i, j, k; + if (M == 1) { + S1() ; + S2() ; + S3() ; + S4() ; + S5() ; + S6() ; + S7() ; + S8() ; + S9() ; + S10() ; + S11() ; + S12() ; + S13() ; + S14() ; + S15() ; + S16() ; + S17() ; + S18() ; + S19() ; + S20() ; + S21() ; + S22() ; + S23() ; + S24() ; + S25() ; + S26() ; + S27() ; + } + if (M == 1) { + for (p1=1;p1<=N;p1++) { + for (p3=1;p3<=N;p3++) { + S28(p1,p3) ; + S29(p1,p3) ; + S30(p1,p3) ; + } + S31(p1) ; + } + } + if (M == 1) { + S32() ; + S33() ; + S34() ; + } + if ((M == 1) && (O <= 1)) { + S35() ; + } + if (M == 1) { + S36() ; + S37() ; + } + if ((M == 1) && (N >= 1) && (Q >= 1) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S40(p1,p3,p5) ; + S41(p1,p3,p5) ; + S42(p1,p3,p5) ; + S43(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S59(p1,p3,p5) ; + S60(p1,p3,p5) ; + S61(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S102(p1,p3,p5) ; + S103(p1,p3,p5) ; + S104(p1,p3,p5) ; + S105(p1,p3,p5) ; + S106(p1,p3,p5) ; + S107(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N <= 0) && (Q >= 1) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S40(p1,p3,p5) ; + S41(p1,p3,p5) ; + S42(p1,p3,p5) ; + S43(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S59(p1,p3,p5) ; + S60(p1,p3,p5) ; + S61(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + for (p5=1;p5<=R;p5++) { + S102(p1,p3,p5) ; + S103(p1,p3,p5) ; + S104(p1,p3,p5) ; + S105(p1,p3,p5) ; + S106(p1,p3,p5) ; + S107(p1,p3,p5) ; + } + } + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N >= 1) && (Q <= 0) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N <= 0) && (Q <= 0) && (R >= 1)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=R;p3++) { + S48(p1,p3) ; + S49(p1,p3) ; + S50(p1,p3) ; + S51(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=R;p3++) { + S65(p1,p3) ; + S66(p1,p3) ; + S67(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=R;p3++) { + S114(p1,p3) ; + S115(p1,p3) ; + S116(p1,p3) ; + S117(p1,p3) ; + S118(p1,p3) ; + S119(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N >= 1) && (Q <= 0) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N <= 0) && (Q <= 0) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N >= 1) && (Q >= 1) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + for (p3=1;p3<=N;p3++) { + for (p5=1;p5<=N;p5++) { + S95(p1,p3,p5) ; + S96(p1,p3,p5) ; + S97(p1,p3,p5) ; + } + S98(p1,p3) ; + } + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } + if ((M == 1) && (N <= 0) && (Q >= 1) && (R <= 0)) { + for (p1=2;p1<=P;p1++) { + S38(p1) ; + S39(p1) ; + for (p3=1;p3<=Q;p3++) { + S44(p1,p3) ; + S45(p1,p3) ; + S46(p1,p3) ; + S47(p1,p3) ; + } + S52(p1) ; + S53(p1) ; + S54(p1) ; + S55(p1) ; + S56(p1) ; + S57(p1) ; + S58(p1) ; + for (p3=1;p3<=Q;p3++) { + S62(p1,p3) ; + S63(p1,p3) ; + S64(p1,p3) ; + } + S68(p1) ; + S69(p1) ; + S70(p1) ; + S71(p1) ; + S72(p1) ; + S73(p1) ; + S74(p1) ; + S75(p1) ; + S76(p1) ; + S77(p1) ; + S78(p1) ; + S79(p1) ; + S80(p1) ; + S81(p1) ; + S82(p1) ; + S83(p1) ; + S84(p1) ; + S85(p1) ; + S86(p1) ; + S87(p1) ; + S88(p1) ; + S89(p1) ; + S90(p1) ; + S91(p1) ; + S92(p1) ; + S93(p1) ; + S94(p1) ; + S99(p1) ; + S100(p1) ; + S101(p1) ; + for (p3=1;p3<=Q;p3++) { + S108(p1,p3) ; + S109(p1,p3) ; + S110(p1,p3) ; + S111(p1,p3) ; + S112(p1,p3) ; + S113(p1,p3) ; + } + S120(p1) ; + S121(p1) ; + S122(p1) ; + S123(p1) ; + S124(p1) ; + S125(p1) ; + } + } +} diff --git a/cloog-core/test/test.c b/cloog-core/test/test.c new file mode 100644 index 0000000..a3d0711 --- /dev/null +++ b/cloog-core/test/test.c @@ -0,0 +1,21 @@ +/* Generated from /home/skimo/git/cloog/test/test.cloog by CLooG 0.14.0-284-ga90f184 gmp bits in 0.01s. */ +for (i=1;i<=2;i++) { + for (j=1;j<=M;j++) { + S1(i,j); + } +} +for (i=3;i<=N;i++) { + for (j=1;j<=min(M,i-1);j++) { + S1(i,j); + } + if (i >= M+1) { + S2(i,i); + } + if (i <= M) { + S1(i,i); + S2(i,i); + } + for (j=i+1;j<=M;j++) { + S1(i,j); + } +} diff --git a/cloog-core/test/test.cloog b/cloog-core/test/test.cloog new file mode 100644 index 0000000..78bd336 --- /dev/null +++ b/cloog-core/test/test.cloog @@ -0,0 +1,33 @@ +# language: C +c + +# parameters {m, n | 4<=m<=n} +2 4 +# m n 1 +1 -1 1 0 +1 1 0 -4 +0 + +2 # Number of statements + +1 +# {i, j | 1<=i<=n 1<=j<=m} +4 6 +# i j m n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 0 1 0 0 -1 +1 0 -1 1 0 0 +0 0 0 + +1 +# {i, j | i=j 3<=j<=N} +3 6 +# i j m n 1 +0 1 -1 0 0 0 +1 0 1 0 0 -3 +1 0 -1 0 1 0 +0 0 0 +0 + +0 # Scattering functions diff --git a/cloog-core/test/test.good.c b/cloog-core/test/test.good.c new file mode 100644 index 0000000..3a786f8 --- /dev/null +++ b/cloog-core/test/test.good.c @@ -0,0 +1,43 @@ +/* Generated from ../../../git/cloog/test/test.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.02s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j) { hash(2); hash(i); hash(j); } + +void test(int M, int N) +{ + /* Original iterators. */ + int i, j; + for (i=1;i<=2;i++) { + for (j=1;j<=M;j++) { + S1(i,j) ; + } + } + for (i=3;i<=M-1;i++) { + for (j=1;j<=i-1;j++) { + S1(i,j) ; + } + S1(i,i) ; + S2(i,i) ; + for (j=i+1;j<=M;j++) { + S1(i,j) ; + } + } + for (j=1;j<=M-1;j++) { + S1(M,j) ; + } + S1(M,M) ; + S2(M,M) ; + for (i=M+1;i<=N;i++) { + for (j=1;j<=M;j++) { + S1(i,j) ; + } + S2(i,i) ; + } +} diff --git a/cloog-core/test/thomasset.c b/cloog-core/test/thomasset.c new file mode 100644 index 0000000..f201f6f --- /dev/null +++ b/cloog-core/test/thomasset.c @@ -0,0 +1,49 @@ +/* Generated from /home/skimo/git/cloog/test/thomasset.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.04s. */ +if (n >= 1) { + for (c1=0;c1<=floord(n-4,3);c1++) { + for (i=3*c1+1;i<=3*c1+3;i++) { + S1(i,c1); + } + } + c1 = floord(n-1,3); + if (c1 >= ceild(n-2,3)) { + if (c1 == 0) { + S1(1,0); + for (j=1;j<=n;j++) { + S2(1,j,0,0,0); + } + } + if (c1 >= 1) { + for (j=1;j<=2;j++) { + S2(1,j,0,c1,0); + } + } + for (i=max(2,3*c1+1);i<=n;i++) { + S1(i,c1); + } + } + if (3*c1 == n-3) { + for (i=n-2;i<=n;i++) { + if (n%3 == 0) { + S1(i,(n-3)/3); + } + } + } + if (c1 >= ceild(n-2,3)) { + for (c2=1;c2<=n-1;c2++) { + for (j=1;j<=2;j++) { + S2(c2+1,j,0,c1,0); + } + } + } + for (c1=ceild(n,3);c1<=floord(2*n,3);c1++) { + for (c2=0;c2<=n-1;c2++) { + for (j=max(1,3*c1-n);j<=min(n,3*c1-n+4);j++) { + p = max(ceild(3*c1-j,3),ceild(n-2,3)); + if (p <= min(floord(n,3),floord(3*c1-j+2,3))) { + S2(c2+1,j,0,p,c1-p); + } + } + } + } +} diff --git a/cloog-core/test/thomasset.cloog b/cloog-core/test/thomasset.cloog new file mode 100644 index 0000000..24c30eb --- /dev/null +++ b/cloog-core/test/thomasset.cloog @@ -0,0 +1,51 @@ +# language: C +c +1 3 +1 0 0 # 0 >= 0 +1 +n + +# ------------- STATEMENTS ------------- +2 # Number of statements + +# ax:Z +1 # The domain is made of one polyhedron +4 5 # 4 lines and 5 columns +# i j n +1 -1 0 1 0 +1 1 0 0 -1 +1 1 -3 0 -1 +1 -1 3 0 3 +0 0 0 # future options + +# ax:P +1 # The domain is made of one polyhedron +10 8 # 10 lines and 8 columns +# i j k p q n +1 -1 0 0 0 0 1 0 +1 0 -1 0 0 0 1 0 +1 0 1 0 0 0 0 -1 +1 1 0 0 0 0 0 -1 +1 0 1 0 0 -3 0 0 +1 0 -1 0 0 3 0 2 +1 0 0 0 -3 0 1 0 +1 0 0 0 3 0 -1 2 +1 0 0 -3 0 0 0 1 +1 0 0 3 0 0 0 1 +0 0 0 # future options +1 # Iterator Names +i j k p q + +# ------------- SCATTERING ------------- +2 # nb scattering functions +# Scattering for ax:Z +2 7 # 2 lines and 7 columns +# c1 c2 i j n +0 1 0 0 -1 0 0 +0 0 1 0 0 0 0 +# Scattering for ax:P +2 10 # 2 lines and 10 columns +# c1 c2 i j k p q n +0 1 0 0 0 -1 -1 -1 0 0 +0 0 1 -1 0 0 0 0 0 1 +0 # Scattering Function Names diff --git a/cloog-core/test/thomasset.good.c b/cloog-core/test/thomasset.good.c new file mode 100644 index 0000000..f9ca016 --- /dev/null +++ b/cloog-core/test/thomasset.good.c @@ -0,0 +1,99 @@ +/* Generated from ../../../git/cloog/test/thomasset.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.10s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j,k,p,q) { hash(2); hash(i); hash(j); hash(k); hash(p); hash(q); } + +void test(int n) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j, k, p, q; + for (c1=0;c1<=floord(n-5,3);c1++) { + for (i=max(3*c1+1,1);i<=3*c1+3;i++) { + S1(i,c1) ; + } + } + if (n == 1) { + S1(1,0) ; + for (k=0;k<=min(0,0);k++) { + for (p=max(0,ceild(-3*k-1,3));p<=min(floord(-3*k+1,3),0);p++) { + q = -k-p ; + S2(1,1,k,p,-k-p) ; + } + } + } + if (n >= 2) { + for (c1=max(0,ceild(n-4,3));c1<=0;c1++) { + S1(1,c1) ; + for (j=1;j<=min(n,3*c1-n+5);j++) { + for (k=0;k<=floord(3*c1-j-n+4,3);k++) { + for (p=ceild(n-2,3);p<=floord(3*c1-j-3*k+2,3);p++) { + q = c1-k-p ; + S2(1,j,k,p,c1-k-p) ; + } + } + } + for (i=2;i<=min(n,3*c1+3);i++) { + S1(i,c1) ; + } + for (c2=1;c2<=n-1;c2++) { + i = c2+1 ; + for (j=1;j<=min(3*c1-n+5,n);j++) { + for (k=0;k<=floord(3*c1-j-n+4,3);k++) { + for (p=ceild(n-2,3);p<=floord(3*c1-j-3*k+2,3);p++) { + q = c1-k-p ; + S2(c2+1,j,k,p,c1-k-p) ; + } + } + } + } + } + } + for (c1=max(1,ceild(n-4,3));c1<=floord(n-1,3);c1++) { + for (j=1;j<=3*c1-n+5;j++) { + for (k=0;k<=min(floord(3*c1-j-n+4,3),0);k++) { + for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { + q = c1-k-p ; + S2(1,j,k,p,c1-k-p) ; + } + } + } + for (i=3*c1+1;i<=min(n,3*c1+3);i++) { + S1(i,c1) ; + } + for (c2=1;c2<=n-1;c2++) { + i = c2+1 ; + for (j=1;j<=3*c1-n+5;j++) { + for (k=0;k<=min(floord(3*c1-j-n+4,3),0);k++) { + for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { + q = c1-k-p ; + S2(c2+1,j,k,p,c1-k-p) ; + } + } + } + } + } + if (n >= 1) { + for (c1=ceild(n,3);c1<=floord(2*n+1,3);c1++) { + for (c2=0;c2<=n-1;c2++) { + i = c2+1 ; + for (j=max(1,3*c1-n-1);j<=min(n,3*c1-n+5);j++) { + for (k=max(ceild(3*c1-j-n,3),0);k<=min(floord(3*c1-j-n+4,3),0);k++) { + for (p=max(ceild(n-2,3),ceild(3*c1-j-3*k,3));p<=min(floord(3*c1-j-3*k+2,3),floord(n,3));p++) { + q = c1-k-p ; + S2(c2+1,j,k,p,c1-k-p) ; + } + } + } + } + } + } +} diff --git a/cloog-core/test/tiling.c b/cloog-core/test/tiling.c new file mode 100644 index 0000000..86f2a2e --- /dev/null +++ b/cloog-core/test/tiling.c @@ -0,0 +1,6 @@ +/* Generated from ../../../git/cloog/test/tiling.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.00s. */ +for (ii=0;ii<=floord(n,10);ii++) { + for (i=10*ii;i<=min(n,10*ii+9);i++) { + S1(ii,i) ; + } +} diff --git a/cloog-core/test/tiling.cloog b/cloog-core/test/tiling.cloog new file mode 100644 index 0000000..fa2b676 --- /dev/null +++ b/cloog-core/test/tiling.cloog @@ -0,0 +1,30 @@ +# language: C +c + +# parameter {n | n>= 0} +1 3 +# n 1 +1 1 0 +1 +n + +1 # Number of statements: + +1 +# {ii, i | t*ii<=i<=t*ii+t-1 0<=i<=n} +4 5 +# ii i n 1 +1 0 1 0 0 +1 0 -1 1 0 +1 10 -1 0 9 +1 -10 1 0 0 +0 0 0 +1 +ii i + +0 # Scattering functions + +1 6 +# c1 ii i n 1 +0 1 -1 -2 0 0 +0 diff --git a/cloog-core/test/tiling.good.c b/cloog-core/test/tiling.good.c new file mode 100644 index 0000000..b736286 --- /dev/null +++ b/cloog-core/test/tiling.good.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/tiling.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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(ii,i) { hash(1); hash(ii); hash(i); } + +void test(int n) +{ + /* Original iterators. */ + int ii, i; + for (ii=0;ii<=floord(n,10);ii++) { + for (i=max(10*ii,0);i<=min(10*ii+9,n);i++) { + S1(ii,i) ; + } + } +} diff --git a/cloog-core/test/uday_scalars.c b/cloog-core/test/uday_scalars.c new file mode 100644 index 0000000..6c8564c --- /dev/null +++ b/cloog-core/test/uday_scalars.c @@ -0,0 +1,9 @@ +/* Generated from ../../../git/cloog/test/uday_scalars.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (n >= 0) { + for (p3=0;p3<=n;p3++) { + S1(p3,0,0) ; + } + for (p3=0;p3<=n;p3++) { + S2(0,p3,0) ; + } +} diff --git a/cloog-core/test/uday_scalars.cloog b/cloog-core/test/uday_scalars.cloog new file mode 100644 index 0000000..8da09d4 --- /dev/null +++ b/cloog-core/test/uday_scalars.cloog @@ -0,0 +1,58 @@ +# Langage: C +c + +# Context (1 parameter) +# no constraints on parameters: +1 3 + 1 0 1 +1 # Parameter name(s) +n + +# Statement number: +2 + +# Iteration domain of statement 1. +1 # 1 domain +4 6 # 4 lines and 6 columns +# j l m n cst + 1 1 0 0 0 0 # j >= 0 + 1 -1 0 0 1 0 # j <= N + 0 0 1 0 0 0 # l = 0 + 0 0 0 1 0 0 # m = 0 +0 0 0 # For future options. + +# Iteration domain of statement 2. +1 # 1 domain +4 6 # 4 lines and 6 columns +# j l m n cst + 1 0 1 0 0 0 # l >= 0 + 1 0 -1 0 1 0 # l <= N + 0 1 0 0 0 0 # j = 0 + 0 0 0 1 0 0 # m = 0 +0 0 0 # For future options. + + +1 # Iterator name(s) +j l m + +# 1 scattering functions. +2 +# First function +4 10 +# p1 p2 p3 p4 j l m n cst + 0 1 0 0 0 0 0 0 0 0 # p1 = 0 + 0 0 1 0 0 0 0 0 0 -1 # p2 = 1 + 0 0 0 1 0 -1 0 0 0 0 # p3 = j + 0 0 0 0 1 0 0 0 0 0 # p4 = 0 + +# Second function +4 10 +# p1 p2 p3 p4 j l m n cst + 0 1 0 0 0 0 0 0 0 -1 # p1 = 1 + 0 0 1 0 0 0 0 0 0 0 # p2 = 0 + 0 0 0 1 0 0 -1 0 0 0 # p3 = l + 0 0 0 0 1 0 0 0 0 -1 # p4 = 1 + +1 # set scattering dimension names manually +p1 p2 p3 p4 + diff --git a/cloog-core/test/uday_scalars.good.c b/cloog-core/test/uday_scalars.good.c new file mode 100644 index 0000000..e4969da --- /dev/null +++ b/cloog-core/test/uday_scalars.good.c @@ -0,0 +1,25 @@ +/* Generated from ../../../git/cloog/test/uday_scalars.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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(j,l,m) { hash(1); hash(j); hash(l); hash(m); } +#define S2(j,l,m) { hash(2); hash(j); hash(l); hash(m); } + +void test(int n) +{ + /* Scattering iterators. */ + int p3; + /* Original iterators. */ + int j, l, m; + for (p3=0;p3<=n;p3++) { + S1(p3,0,0) ; + } + for (p3=0;p3<=n;p3++) { + S2(0,p3,0) ; + } +} diff --git a/cloog-core/test/union.c b/cloog-core/test/union.c new file mode 100644 index 0000000..f65b26f --- /dev/null +++ b/cloog-core/test/union.c @@ -0,0 +1,16 @@ +/* Generated from ../../../git/cloog/test/union.cloog by CLooG 0.16.0-3-g7eee03c gmp bits in 0.00s. */ +if (M <= -1) { + for (c1=0;c1<=100;c1++) { + S1(c1); + } +} +if (M >= 11) { + for (c1=-100;c1<=0;c1++) { + S1(-c1); + } +} +if ((M >= 1) && (M <= 10)) { + for (c1=0;c1<=100;c1++) { + S1(c1); + } +} diff --git a/cloog-core/test/union.cloog b/cloog-core/test/union.cloog new file mode 100644 index 0000000..33e8425 --- /dev/null +++ b/cloog-core/test/union.cloog @@ -0,0 +1,33 @@ +c + +2 +1 3 +1 1 -1 + +1 3 +1 -1 -1 + +0 + +1 + +1 +2 4 +1 1 0 0 +1 -1 0 100 + +0 0 0 + +0 + +1 +2 +2 5 +0 -1 1 0 0 +1 0 0 -1 10 + +2 5 +0 -1 -1 0 0 +1 0 0 1 -11 + +0 diff --git a/cloog-core/test/union.good.c b/cloog-core/test/union.good.c new file mode 100644 index 0000000..70b4537 --- /dev/null +++ b/cloog-core/test/union.good.c @@ -0,0 +1,35 @@ +/* Generated from ../../../git/cloog/test/union.cloog by CLooG 0.14.0-277-g62f7d82 gmp bits in 0.00s. */ +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) { hash(1); hash(i); } + +void test(int M) +{ + /* Scattering iterators. */ + int c1; + /* Original iterators. */ + int i; + if (M <= -1) { + for (c1=0;c1<=100;c1++) { + S1(c1); + } + } + if (M >= 1) { + if (M >= 11) { + for (c1=-100;c1<=0;c1++) { + S1(-c1); + } + } + if (M <= 10) { + for (c1=0;c1<=100;c1++) { + S1(c1); + } + } + } +} diff --git a/cloog-core/test/vasilache.c b/cloog-core/test/vasilache.c new file mode 100644 index 0000000..5a00a33 --- /dev/null +++ b/cloog-core/test/vasilache.c @@ -0,0 +1,27 @@ +/* Generated from ../../../git/cloog/test/vasilache.cloog by CLooG 0.14.0-162-g1e599e0 gmp bits in 0.03s. */ +S1(); +S2(); +for (p1=0;p1<=N-1;p1++) { + for (p3=0;p3<=N-1;p3++) { + S4(p1,p3); + S5(p1,p3); + } +} +for (p1=0;p1<=N-1;p1++) { + for (p3=0;p3<=N-1;p3++) { + for (p5=0;p5<=floord(N-1,32);p5++) { + S7(p1,p3,p5,32*p5); + for (p7=32*p5+1;p7<=min(N-1,32*p5+31);p7++) { + S6(p1,p3,p5,p7-1); + S7(p1,p3,p5,p7); + } + if (p5 <= floord(N-33,32)) { + S6(p1,p3,p5,32*p5+31); + } + if (p5 >= ceild(N-32,32)) { + S6(p1,p3,p5,N-1); + } + } + } +} +S8(); diff --git a/cloog-core/test/vasilache.cloog b/cloog-core/test/vasilache.cloog new file mode 100644 index 0000000..29f9598 --- /dev/null +++ b/cloog-core/test/vasilache.cloog @@ -0,0 +1,248 @@ +# A SCoP from matmul (matmul.B.main.scop1.cloog) to check normalization +# +# Options: +# cloog -f 8 -l 9 vasilache.cloog +# +# Correct: +# S1; +# S2; +# for (p0=0;p0<=N-1;p0++) { +# for (p1=0;p1<=N-1;p1++) { +# S4(i = p0,j = p1); +# S5(i = p0,j = p1); +# } +# } +# for (p0=0;p0<=N-1;p0++) { +# for (p1=0;p1<=N-1;p1++) { +# for (p2=0;p2<=floord(N-1,32);p2++) { +# S7(i = p0,j = p1,k = p2,l = 32*p2); +# for (p3=32*p2+1;p3<=min(N-1,32*p2+31);p3++) { +# S6(i = p0,j = p1,k = p2,l = p3-1); +# S7(i = p0,j = p1,k = p2,l = p3); +# } +# if (p2 >= ceild(N-32,32)) { +# S6(i = p0,j = p1,k = p2,l = N-1); +# } +# if (p2 <= floord(N-33,32)) { +# S6(i = p0,j = p1,k = p2,l = 32*p2+31); +# } +# } +# } +# } +# S8; +# +# +# NOT correct: +# S1 ; +# S2 ; +# for (p1=0;p1<=N-1;p1++) { +# for (p3=0;p3<=N-1;p3++) { +# S4(i = p1,j = p3) ; +# S5(i = p1,j = p3) ; +# } +# } +# for (p1=0;p1<=N-1;p1++) { +# for (p3=0;p3<=N-1;p3++) { +# for (p5=0;p5<=floord(N-1,32);p5++) { +# if (p5 <= 0) { +# S7(i = p1,j = p3,k = p5,l = 0) ; +# } +# p7 = 32*p5 ; +# l = 32*p5 ; +# S7(i = p1,j = p3,k = p5) ; +# for (p7=max(32*p5+1,1);p7<=min(32*p5+31,N-1);p7++) { +# l = p7-1 ; +# S6(i = p1,j = p3,k = p5) ; +# S7(i = p1,j = p3,k = p5,l = p7) ; +# } +# if (p5 >= ceild(N-32,32)) { +# l = N-1 ; +# S6(i = p1,j = p3,k = p5) ; +# } +# p7 = 32*p5+32 ; +# l = 32*p5+31 ; +# S6(i = p1,j = p3,k = p5) ; +# } +# } +# } +# S8 ; + + + +c # language is C +# ---------- CONTEXT ---------- +# Context (constraints on parameters) +2 4 # 1 lines, 4 columns +1 -1 0 3 +1 0 1 -100 + + +0 # Automatically find parameter names + +# ---------- STATEMENTS ---------- +8 # Number of statements + +1 # Statement has a non resticted domain +1 4 +1 0 0 0 +0 0 0 + +1 # Statement has a non resticted domain +1 4 +1 0 0 0 +0 0 0 + +1 # Statement has 1 domain +1 4 +1 1 0 -79 +0 0 0 + +1 # Statement has 1 domain +4 6 +1 1 0 0 0 0 +1 -1 0 0 1 -1 +1 0 1 0 0 0 +1 0 -1 0 1 -1 +0 0 0 + +1 # Statement has 1 domain +4 6 +1 1 0 0 0 0 +1 -1 0 0 1 -1 +1 0 1 0 0 0 +1 0 -1 0 1 -1 +0 0 0 + +1 # Statement has 1 domain +8 8 +1 1 0 0 0 0 0 0 +1 -1 0 0 0 0 1 -1 +1 0 1 0 0 0 0 0 +1 0 -1 0 0 0 1 -1 +1 0 0 0 1 0 0 0 +1 0 0 0 -1 0 1 -1 +1 0 0 -32 1 0 0 0 +1 0 0 32 -1 0 0 31 +0 0 0 + +1 # Statement has 1 domain +8 8 +1 1 0 0 0 0 0 0 +1 -1 0 0 0 0 1 -1 +1 0 1 0 0 0 0 0 +1 0 -1 0 0 0 1 -1 +1 0 0 0 1 0 0 0 +1 0 0 0 -1 0 1 -1 +1 0 0 -32 1 0 0 0 +1 0 0 32 -1 0 0 31 +0 0 0 + +1 # Statement has a non resticted domain +1 4 +1 0 0 0 +0 0 0 + +0 # Automatically find iterator names. + +# ---------- SCATTERING FUNCTIONS ---------- +8 # Number of scattering functions + +9 13 +# p0 p1 p2 p3 p4 p5 p6 p7 p8 +0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 +0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 +0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 +0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 +0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 +0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 +0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 +0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 + +9 13 +# p0 p1 p2 p3 p4 p5 p6 p7 p8 +0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 +0 0 0 1 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 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2 +0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3 +0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 # Alpha & Gamma 4 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 # Beta 4 + +9 13 +# p0 p1 p2 p3 p4 p5 p6 p7 p8 +0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1 +0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1 +0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2 +0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2 +0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3 +0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3 +0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4 +0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4 + +1 # Set the scattering parameter names. +p0 p1 p2 p3 p4 p5 p6 p7 p8 + diff --git a/cloog-core/test/vasilache.good.c b/cloog-core/test/vasilache.good.c new file mode 100644 index 0000000..f12f3fa --- /dev/null +++ b/cloog-core/test/vasilache.good.c @@ -0,0 +1,62 @@ +/* Generated from ../../../git/cloog/test/vasilache.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.15s. */ +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() { hash(1); } +#define S2() { hash(2); } +#define S3() { hash(3); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i,j) { hash(5); hash(i); hash(j); } +#define S6(i,j,k,l) { hash(6); hash(i); hash(j); hash(k); hash(l); } +#define S7(i,j,k,l) { hash(7); hash(i); hash(j); hash(k); hash(l); } +#define S8() { hash(8); } + +void test(int M, int N) +{ + /* Scattering iterators. */ + int p1, p3, p5, p7; + /* Original iterators. */ + int i, j, k, l; + S1() ; + S2() ; + for (p1=0;p1<=N-1;p1++) { + for (p3=0;p3<=N-1;p3++) { + S4(p1,p3) ; + S5(p1,p3) ; + } + } + for (p1=0;p1<=N-1;p1++) { + for (p3=0;p3<=N-1;p3++) { + for (p5=0;p5<=floord(N-1,32);p5++) { + if (p5 >= 0) { + p7 = 32*p5 ; + l = 32*p5 ; + S7(p1,p3,p5,32*p5) ; + } + if (p5 <= -1) { + S7(p1,p3,p5,0) ; + } + for (p7=max(32*p5+1,1);p7<=min(N-1,32*p5+31);p7++) { + l = p7-1 ; + S6(p1,p3,p5,p7-1) ; + S7(p1,p3,p5,p7) ; + } + if (p5 >= ceild(N-32,32)) { + l = N-1 ; + S6(p1,p3,p5,N-1) ; + } + if (p5 <= floord(N-33,32)) { + p7 = 32*p5+32 ; + l = 32*p5+31 ; + S6(p1,p3,p5,32*p5+31) ; + } + } + } + } + S8() ; +} diff --git a/cloog-core/test/vivien.c b/cloog-core/test/vivien.c new file mode 100644 index 0000000..d364046 --- /dev/null +++ b/cloog-core/test/vivien.c @@ -0,0 +1,195 @@ +/* Generated from /home/skimo/git/cloog/test/vivien.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.12s. */ +if (n >= 0) { + for (p1=-54*n+4;p1<=4;p1++) { + if (p1%2 == 0) { + S1((p1-2)/2); + } + } + if (n >= 1) { + S3(1); + } + if (n <= 1) { + S1(2); + } + if (n >= 2) { + S4(1,2); + S1(2); + S6(1,2); + } + for (p1=7;p1<=min(9,4*n-2);p1++) { + if (p1 == 8) { + S4(1,3); + } + if (p1 == 8) { + S1(3); + } + if (p1 == 8) { + S6(1,3); + } + if (p1 == 9) { + S3(2); + } + if ((p1+1)%2 == 0) { + S2((p1-3)/2,1); + } + } + for (p1=10;p1<=min(2*n+58,4*n-2);p1++) { + p2 = ceild(-p1+2,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + } + if (p1 >= 4*n-4) { + if (p1%2 == 0) { + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + p2 = ceild(-p1+6,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + for (p2=ceild(-p1+10,4);p2<=min(-1,floord(-p1+2*n,2));p2++) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + if (p1%2 == 0) { + S6(-p2+2,(p1+2*p2-4)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + if ((p1 >= 2*n+4) && (p1 <= 4*n-6)) { + if (p1%2 == 0) { + S6((p1-2*n+2)/2,n-1); + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + if (p1 >= 2*n+6) { + if (p1%2 == 0) { + S6((p1-2*n)/2,n); + } + } + if (p1 <= 2*n+4) { + if (p1%2 == 0) { + S6(2,(p1-4)/2); + } + if ((p1+3)%4 == 0) { + S3((p1-1)/4); + } + if (p1%2 == 0) { + S1((p1-2)/2); + } + } + if (p1 >= 2*n+5) { + if ((p1+3)%4 == 0) { + S3((p1-1)/4); + } + if (p1%2 == 0) { + S1((p1-2)/2); + } + } + if (p1 <= 2*n+2) { + if (p1%2 == 0) { + S6(1,(p1-2)/2); + } + } + for (p2=max(1,ceild(p1-2*n-1,2));p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + S2((p1-2*p2-1)/2,p2); + } + } + } + if ((n >= 2) && (n <= 29)) { + S2(n,n-1); + } + if ((n >= 2) && (n <= 29)) { + S1(2*n-1); + } + if ((n >= 2) && (n <= 28)) { + S3(n); + } + for (p1=max(7,4*n+2);p1<=2*n+58;p1++) { + if (p1%2 == 0) { + S1((p1-2)/2); + } + } + for (p1=2*n+59;p1<=4*n-2;p1++) { + p2 = ceild(-p1+2,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + } + if (p1 >= 4*n-4) { + if (p1%2 == 0) { + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + p2 = ceild(-p1+6,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + if (p1%2 == 0) { + S6(-p2+2,(p1+2*p2-4)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + if (p1 <= 4*n-6) { + if (p1%2 == 0) { + S6((p1-2*n+2)/2,n-1); + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + if (p1%2 == 0) { + S6((p1-2*n)/2,n); + } + if ((p1+3)%4 == 0) { + S3((p1-1)/4); + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + S2((p1-2*p2-1)/2,p2); + } + } + } + if (n >= 30) { + S2(n,n-1); + } + if (n >= 29) { + S3(n); + } +} diff --git a/cloog-core/test/vivien.cloog b/cloog-core/test/vivien.cloog new file mode 100644 index 0000000..3db4103 --- /dev/null +++ b/cloog-core/test/vivien.cloog @@ -0,0 +1,156 @@ +# Context +c # output in language C + +# no constraints on parameters +1 3 # 1 line and 3 columns + +# n 1 +1 0 0 # 0 >= 0 always true + +1 # Setting manually the parameter' sname +n # The name + + + +# -------------------- Statements ------------------ +6 # Number of statements + + +1 # First statement: 1 domain + +# First domain + +2 4 # 2 lines and 4 columns +# i n 1 +1 1 27 -1 # i >= 1 +1 -1 1 28 # n >= i +0 0 0 + +1 # Second statement: 1 domain + +# First domain + +4 5 # 4 lines and 5 columns +# i k n 1 +1 1 29 0 -1 # i >= 1 +1 -1 0 1 0 # n >= i +1 0 1 0 -1 # k >= 1 +1 1 -1 0 -1 # k <= i-1 +0 0 0 + + +1 # Third statement: 1 domain + +# First domain + +2 4 # 2 lines and 4 columns +# i n 1 +1 1 0 -1 # i >= 1 +1 -1 1 0 # n >= i +0 0 0 + + +1 # Fourth statement: 1 domain + +# First domain + +4 5 # 4 lines and 5 columns +# i j n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # n >= i +1 -1 1 0 -1 # j >= i+1 +1 0 -1 1 0 # j <= n +0 0 0 + +1 # Fifth statement: 1 domain + +# First domain + +6 6 # 6 lines and 6 columns +# i j k n 1 +1 1 0 0 0 -1 # i >= 1 +1 -1 0 0 1 0 # n >= i +1 -1 1 0 0 -1 # j >= i+1 +1 0 -1 0 1 0 # j <= n +1 0 0 1 0 -1 # k >= 1 +1 1 0 -1 0 -1 # k <= i-1 +0 0 0 + +1 # Sixth statement: 1 domain + +# First domain + +4 5 # 4 lines and 5 columns +# i j n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # n >= i +1 -1 1 0 -1 # j >= i+1 +1 0 -1 1 0 # j <= n +0 0 0 + + +1 # We manually set the iterator names +i j k + + +# ------------------------ Scattering ------------------- + +6 # Number of scattering functions + + +# First function +3 7 # 3 lines and 7 columns +# p1 p2 p3 i n 1 +0 1 0 0 -2 0 -2 # p1 = 2i+2 +0 0 1 0 0 0 0 # p2 = 0 +0 0 0 1 0 0 0 # p3 = 0 + +# Second function +3 8 # 3 lines and 8 columns +# p1 p2 p3 i j n 1 +0 1 0 0 -2 -2 0 -1 # p1 = 2i+2j+1 +0 0 1 0 0 -1 0 0 # p2 = j +0 0 0 1 0 0 0 0 # p3 = 0 + +# Third function +3 7 # 3 lines and 7 columns +# p1 p2 p3 i n 1 +0 1 0 0 -4 0 -1 # p1 = 4i+1 +0 0 1 0 0 0 0 # p2 = 0 +0 0 0 1 0 0 0 # p3 = 0 + +# Fourth function +3 8 # 3 lines and 8 columns +# p1 p2 p3 i j n 1 +0 1 0 0 -2 -2 0 0 # p1 = 2i+2j +0 0 1 0 1 0 0 0 # p2 = -i +0 0 0 1 0 0 0 0 # p3 = 0 + + +# Fifth function +3 9 # 3 lines and 9 columns +# p1 p2 p3 i j k n 1 +0 1 0 0 -2 -2 0 0 0 # p1 = 2i+2j +0 0 1 0 1 0 0 0 -1 # p2 = -i+1 +0 0 0 1 0 0 -1 0 0 # p3 = k + +# Sixth function +3 8 # 3 lines and 8 columns +# p1 p2 p3 i j n 1 +0 1 0 0 -2 -2 0 0 # p1 = 2i+2j +0 0 1 0 1 0 0 -2 # p2 = -i+2 +0 0 0 1 0 0 0 0 # p3 = 0 + +1 # Manually set the scattering dimensions +p1 p2 p3 + + + + + + + + + + + diff --git a/cloog-core/test/vivien.good.c b/cloog-core/test/vivien.good.c new file mode 100644 index 0000000..8d2c9d3 --- /dev/null +++ b/cloog-core/test/vivien.good.c @@ -0,0 +1,831 @@ +/* Generated from ../../../git/cloog/test/vivien.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.78s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i) { hash(3); hash(i); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } +#define S6(i,j) { hash(6); hash(i); hash(j); } + +void test(int n) +{ + /* Scattering iterators. */ + int p1, p2, p3; + /* Original iterators. */ + int i, j, k; + for (p1=-54*n+4;p1<=min(4,4*n+1);p1++) { + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + } + if (n >= 1) { + S3(1) ; + } + if (n >= 2) { + S4(1,2) ; + S1(2) ; + S6(1,2) ; + } + for (p1=max(-54*n+4,4*n+2);p1<=6;p1++) { + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + } + for (p1=7;p1<=min(min(2*n+2,9),floord(4*n+12,3));p1++) { + for (p2=ceild(-p1+2,4);p2<=-1;p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + if (p1%2 == 0) { + j = (p1-2)/2 ; + S6(1,(p1-2)/2) ; + } + if ((p1+1)%2 == 0) { + i = (p1-3)/2 ; + S2((p1-3)/2,1) ; + } + } + for (p1=2*n+3;p1<=min(9,4*n-2);p1++) { + for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + if (n >= 4) { + S4(2,3) ; + S4(1,4) ; + S5(2,3,1) ; + S6(2,3) ; + S1(4) ; + S6(1,4) ; + } + if (n == 3) { + S4(2,3) ; + S5(2,3,1) ; + S6(2,3) ; + S1(4) ; + } + for (p1=11;p1<=min(12,2*n+2);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=-1;p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + if (p1%2 == 0) { + j = (p1-4)/2 ; + S6(2,(p1-4)/2) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + if (p1%2 == 0) { + j = (p1-2)/2 ; + S6(1,(p1-2)/2) ; + } + if ((p1+1)%2 == 0) { + i = (p1-3)/2 ; + S2((p1-3)/2,1) ; + } + for (p2=2;p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + if (n == 4) { + S2(4,1) ; + S2(3,2) ; + } + if (n == 5) { + S3(3) ; + S2(5,1) ; + S2(4,2) ; + } + if (n >= 6) { + S3(3) ; + S2(5,1) ; + S2(4,2) ; + } + if ((n <= 4) && (n >= 4)) { + p1 = 2*n+4 ; + for (p2=ceild(-n-1,2);p2<=-2;p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + } + for (p2=ceild(-n+1,2);p2<=-1;p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + S6(2,n) ; + i = n+1 ; + S1(n+1) ; + } + for (p1=14;p1<=2*n+2;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + p2 = floord(-p1+9,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+10,4);p2<=-1;p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + if (p1%2 == 0) { + j = (p1-4)/2 ; + S6(2,(p1-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + if (p1%2 == 0) { + j = (p1-2)/2 ; + S6(1,(p1-2)/2) ; + } + if ((p1+1)%2 == 0) { + i = (p1-3)/2 ; + S2((p1-3)/2,1) ; + } + for (p2=2;p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + if ((n <= 4) && (n >= 4)) { + S3(3) ; + for (p2=-n+6;p2<=2;p2++) { + i = -p2+6 ; + S2(-p2+6,p2) ; + } + } + if (n >= 7) { + p1 = 2*n+3 ; + if ((n+1)%2 == 0) { + i = (n+1)/2 ; + S3((n+1)/2) ; + } + S2(n,1) ; + for (p2=2;p2<=floord(n,2);p2++) { + i = -p2+n+1 ; + S2(-p2+n+1,p2) ; + } + } + if ((n <= 6) && (n >= 6)) { + p1 = 2*n+3 ; + if ((n+1)%2 == 0) { + i = (n+1)/2 ; + S3((n+1)/2) ; + } + S2(n,1) ; + for (p2=2;p2<=floord(n,2);p2++) { + i = -p2+n+1 ; + S2(-p2+n+1,p2) ; + } + } + if (n >= 7) { + p1 = 2*n+4 ; + for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + } + for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + for (p2=ceild(-n+3,2);p2<=-2;p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + i = -p2+2 ; + j = p2+n ; + S6(-p2+2,p2+n) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + j = n-1 ; + S6(3,n-1) ; + S5(2,n,1) ; + S6(2,n) ; + i = n+1 ; + S1(n+1) ; + } + if ((n <= 5) && (n >= 5)) { + p1 = 2*n+4 ; + for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + } + for (p2=ceild(-n+1,2);p2<=-2;p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + for (p2=-1;p2<=floord(-2*n+5,4);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + for (p2=ceild(-n+3,2);p2<=-1;p2++) { + i = -p2+2 ; + j = p2+n ; + S6(-p2+2,p2+n) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + S6(2,n) ; + i = n+1 ; + S1(n+1) ; + } + if ((n <= 6) && (n >= 6)) { + p1 = 2*n+4 ; + for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + } + for (p2=ceild(-n+1,2);p2<=-2;p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + j = n-1 ; + S6(3,n-1) ; + S5(2,n,1) ; + S6(2,n) ; + i = n+1 ; + S1(n+1) ; + } + for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + p2 = floord(-p1+9,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-9,2*n+5);p1<=min(4*n-8,2*n+58);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-7,2*n+5);p1<=min(4*n-6,2*n+58);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(max(4*n-5,14),2*n+5);p1<=min(4*n-2,2*n+58);p1++) { + for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=min(floord(-p1+2*n+4,2),-1);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + if ((n >= 2) && (n <= 29)) { + p1 = 4*n-1 ; + p2 = n-1 ; + j = n-1 ; + S2(n,n-1) ; + } + for (p1=2*n+59;p1<=4*n-10;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + p2 = floord(-p1+9,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) { + for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n,7);p1<=min(4*n+1,2*n+58);p1++) { + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + } + if (n >= 30) { + p1 = 4*n-1 ; + p2 = n-1 ; + j = n-1 ; + S2(n,n-1) ; + } + for (p1=max(max(-54*n+4,4*n+2),7);p1<=2*n+58;p1++) { + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + } + for (p1=max(4*n,2*n+59);p1<=4*n+1;p1++) { + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + } +} diff --git a/cloog-core/test/vivien2.c b/cloog-core/test/vivien2.c new file mode 100644 index 0000000..d4f1f04 --- /dev/null +++ b/cloog-core/test/vivien2.c @@ -0,0 +1,168 @@ +/* Generated from /home/skimo/git/cloog/test/vivien2.cloog by CLooG 0.14.0-292-g2bfd6ac gmp bits in 0.10s. */ +for (p1=-54*n+4;p1<=4;p1++) { + if (p1%2 == 0) { + S1((p1-2)/2); + } +} +S3(1); +S4(1,2); +S1(2); +S6(1,2); +for (p1=7;p1<=9;p1++) { + if (p1 == 8) { + S4(1,3); + } + if (p1 == 8) { + S1(3); + } + if (p1 == 8) { + S6(1,3); + } + if (p1 == 9) { + S3(2); + } + if ((p1+1)%2 == 0) { + S2((p1-3)/2,1); + } +} +for (p1=10;p1<=2*n+58;p1++) { + p2 = ceild(-p1+2,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + } + if (p1 >= 4*n-4) { + if (p1%2 == 0) { + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + p2 = ceild(-p1+6,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + for (p2=ceild(-p1+10,4);p2<=min(-1,floord(-p1+2*n,2));p2++) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + if (p1%2 == 0) { + S6(-p2+2,(p1+2*p2-4)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + if ((p1 >= 2*n+4) && (p1 <= 4*n-6)) { + if (p1%2 == 0) { + S6((p1-2*n+2)/2,n-1); + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + if (p1 >= 2*n+6) { + if (p1%2 == 0) { + S6((p1-2*n)/2,n); + } + } + if (p1 <= 2*n+4) { + if (p1%2 == 0) { + S6(2,(p1-4)/2); + } + if ((p1+3)%4 == 0) { + S3((p1-1)/4); + } + if (p1%2 == 0) { + S1((p1-2)/2); + } + } + if (p1 >= 2*n+5) { + if ((p1+3)%4 == 0) { + S3((p1-1)/4); + } + if (p1%2 == 0) { + S1((p1-2)/2); + } + } + if (p1 <= 2*n+2) { + if (p1%2 == 0) { + S6(1,(p1-2)/2); + } + } + for (p2=max(1,ceild(p1-2*n-1,2));p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + S2((p1-2*p2-1)/2,p2); + } + } +} +for (p1=2*n+59;p1<=4*n-2;p1++) { + p2 = ceild(-p1+2,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+5,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + } + if (p1 >= 4*n-4) { + if (p1%2 == 0) { + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + p2 = ceild(-p1+6,4); + if (p2 <= min(floord(-p1+2*n,2),floord(-p1+9,4))) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + S4(-p2,(p1+2*p2)/2); + } + if (p1%2 == 0) { + S6(-p2+2,(p1+2*p2-4)/2); + } + for (p3=1;p3<=-p2;p3++) { + if (p1%2 == 0) { + S5(-p2+1,(p1+2*p2-2)/2,p3); + } + } + } + if (p1 <= 4*n-6) { + if (p1%2 == 0) { + S6((p1-2*n+2)/2,n-1); + for (p3=1;p3<=floord(p1-2*n-2,2);p3++) { + S5((p1-2*n)/2,n,p3); + } + } + } + if (p1%2 == 0) { + S6((p1-2*n)/2,n); + } + if ((p1+3)%4 == 0) { + S3((p1-1)/4); + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + S2((p1-2*p2-1)/2,p2); + } + } +} +S2(n,n-1); +S3(n); diff --git a/cloog-core/test/vivien2.cloog b/cloog-core/test/vivien2.cloog new file mode 100644 index 0000000..42e7fb7 --- /dev/null +++ b/cloog-core/test/vivien2.cloog @@ -0,0 +1,156 @@ +# Context +c # output in language C + +# no constraints on parameters +1 3 # 1 line and 3 columns + +# n 1 +1 1 -30 # 0 >= 0 always true + +1 # Setting manually the parameter' sname +n # The name + + + +# -------------------- Statements ------------------ +6 # Number of statements + + +1 # First statement: 1 domain + +# First domain + +2 4 # 2 lines and 4 columns +# i n 1 +1 1 27 -1 # i >= 1 +1 -1 1 28 # n >= i +0 0 0 + +1 # Second statement: 1 domain + +# First domain + +4 5 # 4 lines and 5 columns +# i k n 1 +1 1 29 0 -1 # i >= 1 +1 -1 0 1 0 # n >= i +1 0 1 0 -1 # k >= 1 +1 1 -1 0 -1 # k <= i-1 +0 0 0 + + +1 # Third statement: 1 domain + +# First domain + +2 4 # 2 lines and 4 columns +# i n 1 +1 1 0 -1 # i >= 1 +1 -1 1 0 # n >= i +0 0 0 + + +1 # Fourth statement: 1 domain + +# First domain + +4 5 # 4 lines and 5 columns +# i j n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # n >= i +1 -1 1 0 -1 # j >= i+1 +1 0 -1 1 0 # j <= n +0 0 0 + +1 # Fifth statement: 1 domain + +# First domain + +6 6 # 6 lines and 6 columns +# i j k n 1 +1 1 0 0 0 -1 # i >= 1 +1 -1 0 0 1 0 # n >= i +1 -1 1 0 0 -1 # j >= i+1 +1 0 -1 0 1 0 # j <= n +1 0 0 1 0 -1 # k >= 1 +1 1 0 -1 0 -1 # k <= i-1 +0 0 0 + +1 # Sixth statement: 1 domain + +# First domain + +4 5 # 4 lines and 5 columns +# i j n 1 +1 1 0 0 -1 # i >= 1 +1 -1 0 1 0 # n >= i +1 -1 1 0 -1 # j >= i+1 +1 0 -1 1 0 # j <= n +0 0 0 + + +1 # We manually set the iterator names +i j k + + +# ------------------------ Scattering ------------------- + +6 # Number of scattering functions + + +# First function +3 7 # 3 lines and 7 columns +# p1 p2 p3 i n 1 +0 1 0 0 -2 0 -2 # p1 = 2i+2 +0 0 1 0 0 0 0 # p2 = 0 +0 0 0 1 0 0 0 # p3 = 0 + +# Second function +3 8 # 3 lines and 8 columns +# p1 p2 p3 i j n 1 +0 1 0 0 -2 -2 0 -1 # p1 = 2i+2j+1 +0 0 1 0 0 -1 0 0 # p2 = j +0 0 0 1 0 0 0 0 # p3 = 0 + +# Third function +3 7 # 3 lines and 7 columns +# p1 p2 p3 i n 1 +0 1 0 0 -4 0 -1 # p1 = 4i+1 +0 0 1 0 0 0 0 # p2 = 0 +0 0 0 1 0 0 0 # p3 = 0 + +# Fourth function +3 8 # 3 lines and 8 columns +# p1 p2 p3 i j n 1 +0 1 0 0 -2 -2 0 0 # p1 = 2i+2j +0 0 1 0 1 0 0 0 # p2 = -i +0 0 0 1 0 0 0 0 # p3 = 0 + + +# Fifth function +3 9 # 3 lines and 9 columns +# p1 p2 p3 i j k n 1 +0 1 0 0 -2 -2 0 0 0 # p1 = 2i+2j +0 0 1 0 1 0 0 0 -1 # p2 = -i+1 +0 0 0 1 0 0 -1 0 0 # p3 = k + +# Sixth function +3 8 # 3 lines and 8 columns +# p1 p2 p3 i j n 1 +0 1 0 0 -2 -2 0 0 # p1 = 2i+2j +0 0 1 0 1 0 0 -2 # p2 = -i+2 +0 0 0 1 0 0 0 0 # p3 = 0 + +1 # Manually set the scattering dimensions +p1 p2 p3 + + + + + + + + + + + diff --git a/cloog-core/test/vivien2.good.c b/cloog-core/test/vivien2.good.c new file mode 100644 index 0000000..32f1fff --- /dev/null +++ b/cloog-core/test/vivien2.good.c @@ -0,0 +1,656 @@ +/* Generated from ../../../git/cloog/test/vivien2.cloog by CLooG 0.14.0-76-gef19709 gmp bits in 0.58s. */ +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) { hash(1); hash(i); } +#define S2(i,j) { hash(2); hash(i); hash(j); } +#define S3(i) { hash(3); hash(i); } +#define S4(i,j) { hash(4); hash(i); hash(j); } +#define S5(i,j,k) { hash(5); hash(i); hash(j); hash(k); } +#define S6(i,j) { hash(6); hash(i); hash(j); } + +void test(int n) +{ + /* Scattering iterators. */ + int p1, p2, p3; + /* Original iterators. */ + int i, j, k; + for (p1=-54*n+4;p1<=4;p1++) { + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + } + S3(1) ; + S4(1,2) ; + S1(2) ; + S6(1,2) ; + for (p1=7;p1<=9;p1++) { + for (p2=ceild(-p1+2,4);p2<=-1;p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + if (p1%2 == 0) { + j = (p1-2)/2 ; + S6(1,(p1-2)/2) ; + } + if ((p1+1)%2 == 0) { + i = (p1-3)/2 ; + S2((p1-3)/2,1) ; + } + } + S4(2,3) ; + S4(1,4) ; + S5(2,3,1) ; + S6(2,3) ; + S1(4) ; + S6(1,4) ; + for (p1=11;p1<=12;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=-1;p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + if (p1%2 == 0) { + j = (p1-4)/2 ; + S6(2,(p1-4)/2) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + if (p1%2 == 0) { + j = (p1-2)/2 ; + S6(1,(p1-2)/2) ; + } + if ((p1+1)%2 == 0) { + i = (p1-3)/2 ; + S2((p1-3)/2,1) ; + } + for (p2=2;p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + S3(3) ; + S2(5,1) ; + S2(4,2) ; + for (p1=14;p1<=2*n+2;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + p2 = floord(-p1+9,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+10,4);p2<=-1;p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + if (p1%2 == 0) { + j = (p1-4)/2 ; + S6(2,(p1-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + if (p1%2 == 0) { + j = (p1-2)/2 ; + S6(1,(p1-2)/2) ; + } + if ((p1+1)%2 == 0) { + i = (p1-3)/2 ; + S2((p1-3)/2,1) ; + } + for (p2=2;p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + p1 = 2*n+3 ; + if ((n+1)%2 == 0) { + i = (n+1)/2 ; + S3((n+1)/2) ; + } + S2(n,1) ; + for (p2=2;p2<=floord(n,2);p2++) { + i = -p2+n+1 ; + S2(-p2+n+1,p2) ; + } + p1 = 2*n+4 ; + for (p2=ceild(-n-1,2);p2<=floord(-2*n+1,4);p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + } + for (p2=ceild(-n+1,2);p2<=floord(-2*n+5,4);p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + for (p2=ceild(-n+3,2);p2<=-2;p2++) { + j = p2+n+2 ; + S4(-p2,p2+n+2) ; + i = -p2+2 ; + j = p2+n ; + S6(-p2+2,p2+n) ; + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + j = p2+n+1 ; + S5(-p2+1,p2+n+1,p3) ; + } + } + j = n-1 ; + S6(3,n-1) ; + S5(2,n,1) ; + S6(2,n) ; + i = n+1 ; + S1(n+1) ; + for (p1=2*n+5;p1<=min(4*n-10,2*n+58);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + p2 = floord(-p1+9,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+2*n+3,2);p2<=min(floord(-p1+2*n+4,2),-1);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=4*n-9;p1<=min(4*n-8,2*n+58);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=4*n-7;p1<=min(4*n-6,2*n+58);p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=4*n-5;p1<=2*n+58;p1++) { + for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=max(ceild(-p1+2*n+3,2),ceild(-p1+10,4));p2<=floord(-p1+2*n+4,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + if (p1%2 == 0) { + i = (p1-2)/2 ; + S1((p1-2)/2) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=2*n+59;p1<=4*n-10;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + p2 = floord(-p1+9,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-9,2*n+59);p1<=4*n-8;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+2,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-7,2*n+59);p1<=4*n-6;p1++) { + p2 = floord(-p1+5,4) ; + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p2=ceild(-p1+6,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+2*n+1,2);p2<=floord(-p1+9,4);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=ceild(-p1+10,4);p2<=floord(-p1+2*n+2,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + p2 = floord(-p1+2*n+4,2) ; + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + for (p1=max(4*n-5,2*n+59);p1<=4*n-2;p1++) { + for (p2=ceild(-p1+2,4);p2<=floord(-p1+2*n,2);p2++) { + if (p1%2 == 0) { + j = (p1+2*p2)/2 ; + S4(-p2,(p1+2*p2)/2) ; + } + } + for (p2=max(ceild(-p1+2*n+1,2),ceild(-p1+6,4));p2<=floord(-p1+2*n+2,2);p2++) { + for (p3=1;p3<=-p2;p3++) { + i = -p2+1 ; + if (p1%2 == 0) { + j = (p1+2*p2-2)/2 ; + S5(-p2+1,(p1+2*p2-2)/2,p3) ; + } + } + } + for (p2=max(ceild(-p1+10,4),ceild(-p1+2*n+3,2));p2<=floord(-p1+2*n+4,2);p2++) { + i = -p2+2 ; + if (p1%2 == 0) { + j = (p1+2*p2-4)/2 ; + S6(-p2+2,(p1+2*p2-4)/2) ; + } + } + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + for (p2=ceild(p1-2*n-1,2);p2<=floord(p1-3,4);p2++) { + if ((p1+1)%2 == 0) { + i = (p1-2*p2-1)/2 ; + S2((p1-2*p2-1)/2,p2) ; + } + } + } + p1 = 4*n-1 ; + p2 = n-1 ; + j = n-1 ; + S2(n,n-1) ; + for (p1=4*n;p1<=4*n+1;p1++) { + if ((p1+3)%4 == 0) { + i = (p1-1)/4 ; + S3((p1-1)/4) ; + } + } +} diff --git a/cloog-core/test/walters.c b/cloog-core/test/walters.c new file mode 100644 index 0000000..866c6ec --- /dev/null +++ b/cloog-core/test/walters.c @@ -0,0 +1,19 @@ +/* Generated from ../../../git/cloog/test/walters.cloog by CLooG 0.14.0-278-gcf1f323 gmp bits in 0.02s. */ +S2(1,0,1,0); +S4(1,0,1,0); +S3(2,0,1,1); +S4(2,0,1,1); +for (i=3;i<=10;i++) { + if ((i+1)%3 == 0) { + S3(i,(i-2)/3,(i+1)/3,(i+1)/3); + } + if ((i+2)%3 == 0) { + S2(i,(i-1)/3,(i+2)/3,(i-1)/3); + } + if (i%3 == 0) { + S1(i,i/3,i/3,i/3); + } + div36 = floord(i,3); + div37 = floord(i+2,3); + S4(i,div36,div37,i-div36-div37); +} diff --git a/cloog-core/test/walters.cloog b/cloog-core/test/walters.cloog new file mode 100644 index 0000000..9a3ba81 --- /dev/null +++ b/cloog-core/test/walters.cloog @@ -0,0 +1,189 @@ +# language: C + +c + + + +# parameters + +1 2 + +1 1 + + 1 + + + +4 + + + +# S1: sub1 + +1 + +18 6 + + 1 1 0 0 0 -1 + + 1 -1 0 0 0 10 + + 1 -1 3 0 0 2 + + 1 1 -3 0 0 0 + + 1 0 1 0 0 -1 + + 1 -1 3 0 0 0 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 0 + + 1 1 0 0 -3 1 + + 1 -1 0 0 3 1 + + 1 1 0 0 0 -1 + + 1 -1 0 0 0 10 + + 1 1 -3 0 0 0 + + 1 -1 3 0 0 2 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 0 + + 1 1 0 0 -3 1 + + 1 -1 0 0 3 1 + + 0 0 0 + + + +# S2: sub2 + +1 + +17 6 + + 1 1 0 0 0 -1 + + 1 -1 0 0 0 10 + + 1 -1 0 3 0 0 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 -2 + + 1 1 -3 0 0 0 + + 1 -1 3 0 0 2 + + 1 1 0 0 -3 1 + + 1 -1 0 0 3 1 + + 1 1 0 0 0 -1 + + 1 -1 0 0 0 10 + + 1 1 -3 0 0 0 + + 1 -1 3 0 0 2 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 0 + + 1 1 0 0 -3 1 + + 1 -1 0 0 3 1 + + 0 0 0 + + + +# S3: sub3 + +1 + +18 6 + + 1 -1 0 0 0 10 + + 1 1 0 0 0 -1 + + 1 -1 0 0 3 1 + + 1 1 0 0 -3 1 + + 1 0 0 0 1 -1 + + 1 -1 0 0 3 -1 + + 1 1 -3 0 0 0 + + 1 -1 3 0 0 2 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 0 + + 1 1 0 0 0 -1 + + 1 -1 0 0 0 10 + + 1 1 -3 0 0 0 + + 1 -1 3 0 0 2 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 0 + + 1 1 0 0 -3 1 + + 1 -1 0 0 3 1 + + 0 0 0 + + + +# S4: enclosing + +1 + +8 6 + + 1 1 0 0 0 -1 + + 1 -1 0 0 0 10 + + 1 1 -3 0 0 0 + + 1 -1 3 0 0 2 + + 1 1 0 -3 0 2 + + 1 -1 0 3 0 0 + + 1 1 0 0 -3 1 + + 1 -1 0 0 3 1 + + 0 0 0 + + + + 1 + + i div36 div37 div38 + + 0 + + 0 diff --git a/cloog-core/test/walters.good.c b/cloog-core/test/walters.good.c new file mode 100644 index 0000000..0e1c2b7 --- /dev/null +++ b/cloog-core/test/walters.good.c @@ -0,0 +1,46 @@ +/* Generated from /home/skimo/git/cloog/test/walters.cloog by CLooG 0.14.0-223-gad1f0a0 gmp bits in 0.01s. */ +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,div36,div37,div38) { hash(1); hash(i); hash(div36); hash(div37); hash(div38); } +#define S2(i,div36,div37,div38) { hash(2); hash(i); hash(div36); hash(div37); hash(div38); } +#define S3(i,div36,div37,div38) { hash(3); hash(i); hash(div36); hash(div37); hash(div38); } +#define S4(i,div36,div37,div38) { hash(4); hash(i); hash(div36); hash(div37); hash(div38); } + +void test() +{ + /* Original iterators. */ + int i, div36, div37, div38; + S2(1,0,1,0); + S4(1,0,1,0); + S3(2,0,1,1); + S4(2,0,1,1); + for (i=3;i<=10;i++) { + if ((i+2)%3 <= 1) { + div36 = floord(i-1,3); + if ((i+1)%3 <= 1) { + div37 = floord(i+1,3); + if ((i+1)%3 == 0) { + S3(i,div36,div37,(i+1)/3); + S4(i,div36,div37,(i+1)/3); + } + } + if ((i+2)%3 == 0) { + div38 = floord(i+1,3); + S2(i,div36,(i+2)/3,div38); + S4(i,div36,(i+2)/3,div38); + } + } + if (i%3 == 0) { + div37 = floord(i+2,3); + div38 = floord(i+1,3); + S1(i,i/3,div37,div38); + S4(i,i/3,div37,div38); + } + } +} diff --git a/cloog-core/test/walters2.c b/cloog-core/test/walters2.c new file mode 100644 index 0000000..bc31d9e --- /dev/null +++ b/cloog-core/test/walters2.c @@ -0,0 +1,14 @@ +/* Generated from ../../../git/cloog/test/walters2.cloog by CLooG 0.14.0-245-gd8c1718 gmp bits in 0.01s. */ +for (i=0;i<=51;i++) { + S2(0,i); +} +for (j=1;j<=24;j++) { + S2(j,0); + for (i=1;i<=50;i++) { + S1(j,i); + } + S2(j,51); +} +for (i=0;i<=51;i++) { + S2(25,i); +} diff --git a/cloog-core/test/walters2.cloog b/cloog-core/test/walters2.cloog new file mode 100644 index 0000000..efdf2f6 --- /dev/null +++ b/cloog-core/test/walters2.cloog @@ -0,0 +1,90 @@ +# language: C +c + +# parameters +1 2 +1 1 + 1 + +2 + + +# S1 +1 +12 4 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 1 1 0 -1 + 1 0 1 -1 + 1 -1 0 24 + 1 0 -1 50 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 0 0 0 + + + + + + +# S2 +4 +11 4 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 1 1 0 -1 + 1 0 1 -1 + 1 1 0 -25 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 +12 4 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 1 1 0 -1 + 1 0 1 -1 + 1 -1 0 24 + 1 0 1 -51 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 +10 4 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 1 1 0 -1 + 1 0 -1 0 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 +9 4 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 1 -1 0 0 + 1 1 0 0 + 1 -1 0 25 + 1 0 1 0 + 1 0 -1 51 + 0 0 0 + + + + 1 + j i + 0 + 0 + diff --git a/cloog-core/test/walters2.good.c b/cloog-core/test/walters2.good.c new file mode 100644 index 0000000..2b8990f --- /dev/null +++ b/cloog-core/test/walters2.good.c @@ -0,0 +1,32 @@ +/* Generated from /home/skimo/git/cloog/test/walters2.cloog by CLooG 0.14.0-227-g08f253a gmp bits in 0.00s. */ +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(j,i) { hash(1); hash(j); hash(i); } +#define S2(j,i) { hash(2); hash(j); hash(i); } + +void test() +{ + /* Original iterators. */ + int j, i; + for (i=0;i<=51;i++) { + S2(0,i); + } + for (j=1;j<=24;j++) { + S2(j,0); + for (i=1;i<=50;i++) { + S1(j,i); + } + S2(j,51); + } + for (i=0;i<=51;i++) { + if (i >= 0) { + S2(25,i); + } + } +} diff --git a/cloog-core/test/walters3.c b/cloog-core/test/walters3.c new file mode 100644 index 0000000..fc922d6 --- /dev/null +++ b/cloog-core/test/walters3.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/walters3.cloog by CLooG 0.14.0-338-g99c7504 gmp bits in 0.00s. */ +for (j=2;j<=8;j++) { + if (j%2 == 0) { + S1(j,j/2,j/2); + S2(j,j/2,j/2); + } +} +S2(10,5,5); diff --git a/cloog-core/test/walters3.cloog b/cloog-core/test/walters3.cloog new file mode 100644 index 0000000..fb45ab0 --- /dev/null +++ b/cloog-core/test/walters3.cloog @@ -0,0 +1,49 @@ +# language: C +c + +# parameters +1 2 +1 1 + 1 + + +2 + +1 +15 5 + 1 -1 0 0 10 + 1 -1 0 0 8 + 1 -1 0 2 1 + 1 1 0 -2 0 + 1 -1 0 2 0 + 1 0 0 1 -1 + 1 1 -2 0 0 + 1 -1 2 0 1 + 1 1 0 0 -1 + 1 -1 0 0 10 + 0 1 -2 0 0 + 1 1 -2 0 0 + 1 -1 2 0 1 + 1 1 0 -2 0 + 1 -1 0 2 1 + 0 0 0 + + + +1 +7 5 + 1 1 0 0 -1 + 1 -1 0 0 10 + 0 1 -2 0 0 + 1 1 -2 0 0 + 1 -1 2 0 1 + 1 1 0 -2 0 + 1 -1 0 2 1 + 0 0 0 + + + 1 + j a b + #-------- SCATTERING ------------- + 0 # no scattering function + diff --git a/cloog-core/test/walters3.good.c b/cloog-core/test/walters3.good.c new file mode 100644 index 0000000..45a1b33 --- /dev/null +++ b/cloog-core/test/walters3.good.c @@ -0,0 +1,24 @@ +/* Generated from ../../../git/cloog/test/walters3.cloog by CLooG 0.14.0-338-g99c7504 gmp bits in 0.00s. */ +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(j,a,b) { hash(1); hash(j); hash(a); hash(b); } +#define S2(j,a,b) { hash(2); hash(j); hash(a); hash(b); } + +void test() +{ + /* Original iterators. */ + int j, a, b; + for (j=2;j<=8;j++) { + if (j%2 == 0) { + S1(j,j/2,j/2); + S2(j,j/2,j/2); + } + } + S2(10,5,5); +} diff --git a/cloog-core/test/wavefront.c b/cloog-core/test/wavefront.c new file mode 100644 index 0000000..c6d2868 --- /dev/null +++ b/cloog-core/test/wavefront.c @@ -0,0 +1,8 @@ +/* Generated from ../../../git/cloog/test/wavefront.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if ((m >= 1) && (n >= 1)) { + for (c1=2;c1<=n+m;c1++) { + for (c2=max(1,c1-m);c2<=min(n,c1-1);c2++) { + S1(c2,c1-c2) ; + } + } +} diff --git a/cloog-core/test/wavefront.cloog b/cloog-core/test/wavefront.cloog new file mode 100644 index 0000000..845b368 --- /dev/null +++ b/cloog-core/test/wavefront.cloog @@ -0,0 +1,27 @@ +c + +1 4 +# n m 1 +1 0 0 1 +1 +n m + +1 + +1 +4 6 +# i j n m 1 +1 1 0 0 0 -1 +1 -1 0 1 0 0 +1 0 1 0 0 -1 +1 0 -1 0 1 0 +0 0 0 + +0 + +1 +2 8 +# c1 c2 i j n m 1 +0 1 0 -1 -1 0 0 0 +0 0 1 -1 0 0 0 0 +0 diff --git a/cloog-core/test/wavefront.good.c b/cloog-core/test/wavefront.good.c new file mode 100644 index 0000000..c6e721f --- /dev/null +++ b/cloog-core/test/wavefront.good.c @@ -0,0 +1,26 @@ +/* Generated from ../../../git/cloog/test/wavefront.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.00s. */ +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) { hash(1); hash(i); hash(j); } + +void test(int n, int m) +{ + /* Scattering iterators. */ + int c1, c2; + /* Original iterators. */ + int i, j; + if ((n >= 1) && (m >= 1)) { + for (c1=2;c1<=n+m;c1++) { + for (c2=max(1,c1-m);c2<=min(n,c1-1);c2++) { + j = c1-c2 ; + S1(c2,c1-c2) ; + } + } + } +} diff --git a/cloog-core/test/yosr.c b/cloog-core/test/yosr.c new file mode 100644 index 0000000..341c787 --- /dev/null +++ b/cloog-core/test/yosr.c @@ -0,0 +1,21 @@ +/* Generated from ../../../git/cloog/test/yosr.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. */ +if (n >= 2) { + for (j=2;j<=n;j++) { + S1(1,j) ; + } + for (proc=2;proc<=n-1;proc++) { + for (i=1;i<=proc-1;i++) { + for (j=i+1;j<=n;j++) { + S2(i,j,proc) ; + } + } + for (j=proc+1;j<=n;j++) { + S1(proc,j) ; + } + } + for (i=1;i<=n-1;i++) { + for (j=i+1;j<=n;j++) { + S2(i,j,n) ; + } + } +} diff --git a/cloog-core/test/yosr.cloog b/cloog-core/test/yosr.cloog new file mode 100644 index 0000000..cefa035 --- /dev/null +++ b/cloog-core/test/yosr.cloog @@ -0,0 +1,65 @@ +# language: C +c + +# One parameter : n +1 3 +# n 1 +1 0 1 +# We want to set the parameter names... +1 +# and 'n' is the name of the unique parameter +n + +2 # Number of statements: 2. + +1 +# {i, j | 1<=i<=n-1; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 -1 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 + +1 +# {i, j, k | 1<=i<=n-1; i+1<=j<=n i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 -1 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 +# We want to let CLooG set the iterator names. +0 + +2 +# Scattering functions +1 6 +# c1 i j n 1 +0 1 -1 0 0 0 + +1 7 +# c1 i j k n 1 +0 1 0 0 -1 0 0 +1 +proc + +2 +# Scattering functions +3 8 +# c1 c2 c3 i j n 1 +0 1 0 0 -1 0 0 0 +0 0 1 0 0 0 0 0 +0 0 0 1 0 0 0 0 + +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 0 0 -1 0 0 +0 0 1 0 0 0 0 0 -1 +0 0 0 1 0 0 -1 0 0 +0 + diff --git a/cloog-core/test/yosr.good.c b/cloog-core/test/yosr.good.c new file mode 100644 index 0000000..8845a2c --- /dev/null +++ b/cloog-core/test/yosr.good.c @@ -0,0 +1,41 @@ +/* Generated from ../../../git/cloog/test/yosr.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i,j,k) { hash(2); hash(i); hash(j); hash(k); } + +void test(int n) +{ + /* Scattering iterators. */ + int proc; + /* Original iterators. */ + int i, j, k; + if (n >= 2) { + for (j=2;j<=n;j++) { + S1(1,j) ; + } + } + for (proc=2;proc<=n-1;proc++) { + for (i=1;i<=proc-1;i++) { + for (j=i+1;j<=n;j++) { + S2(i,j,proc) ; + } + } + for (j=proc+1;j<=n;j++) { + S1(proc,j) ; + } + } + if (n >= 2) { + for (i=1;i<=n-1;i++) { + for (j=i+1;j<=n;j++) { + S2(i,j,n) ; + } + } + } +} diff --git a/cloog-core/test/yosr2.c b/cloog-core/test/yosr2.c new file mode 100644 index 0000000..999eb41 --- /dev/null +++ b/cloog-core/test/yosr2.c @@ -0,0 +1,23 @@ +/* Generated from ../../../git/cloog/test/yosr2.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.02s. */ +for (i=1;i<=M;i++) { + S2(i) ; +} +for (proc=2;proc<=M-1;proc++) { + for (i=1;i<=proc-1;i++) { + S4(i,proc) ; + } + for (j=1;j<=proc-1;j++) { + S1(proc,j) ; + } + for (j=proc+1;j<=M;j++) { + for (k=1;k<=proc-1;k++) { + S3(proc,j,k) ; + } + } +} +for (i=1;i<=M-1;i++) { + S4(i,M) ; +} +for (j=1;j<=M-1;j++) { + S1(M,j) ; +} diff --git a/cloog-core/test/yosr2.cloog b/cloog-core/test/yosr2.cloog new file mode 100644 index 0000000..e9dea4a --- /dev/null +++ b/cloog-core/test/yosr2.cloog @@ -0,0 +1,71 @@ +# language: C +c + +# parameter n +1 3 +# n 1 +1 1 -2 +0 + +4 # Number of statements + +1 +# S2 {k, l | 1<=k<=n; 1<=l<=k-1} +4 5 +# k l n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 0 1 0 -1 +1 1 -1 0 -1 +0 0 0 + +1 +# S3 {k | 1<=k<=n} +2 4 +# k n 1 +1 1 0 -1 +1 -1 1 0 +0 0 0 + +1 +# S5 {k, i, m | 1<=k<=n; k+1<=i<=n 1<=m<=k-1} +6 6 +# k i m n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 0 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 0 0 1 0 -1 +1 1 0 -1 0 -1 +0 0 0 + +1 +# S4 {k, i | 1<=k<=n; k+1<=i<=n} +4 5 +# k i n 1 +1 1 0 0 -1 +1 -1 0 1 0 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 +0 + + +4 # Scattering functions +1 6 +# c1 k l n 1 +0 1 -1 0 0 0 + +1 5 +# c1 k n 1 +0 1 0 0 0 + +1 7 +# c1 k i m n 1 +0 1 -1 0 0 0 0 + +1 6 +# c1 k i n 1 +0 1 0 -1 0 0 +1 +proc diff --git a/cloog-core/test/yosr2.good.c b/cloog-core/test/yosr2.good.c new file mode 100644 index 0000000..7608db8 --- /dev/null +++ b/cloog-core/test/yosr2.good.c @@ -0,0 +1,43 @@ +/* Generated from ../../../git/cloog/test/yosr2.cloog by CLooG 0.14.0-72-gefe2fc2 gmp bits in 0.01s. */ +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) { hash(1); hash(i); hash(j); } +#define S2(i) { hash(2); hash(i); } +#define S3(i,j,k) { hash(3); hash(i); hash(j); hash(k); } +#define S4(i,j) { hash(4); hash(i); hash(j); } + +void test(int M) +{ + /* Scattering iterators. */ + int proc; + /* Original iterators. */ + int i, j, k; + for (i=1;i<=M;i++) { + S2(i) ; + } + for (proc=2;proc<=M-1;proc++) { + for (i=1;i<=proc-1;i++) { + S4(i,proc) ; + } + for (j=1;j<=proc-1;j++) { + S1(proc,j) ; + } + for (j=proc+1;j<=M;j++) { + for (k=1;k<=proc-1;k++) { + S3(proc,j,k) ; + } + } + } + for (i=1;i<=M-1;i++) { + S4(i,M) ; + } + for (j=1;j<=M-1;j++) { + S1(M,j) ; + } +} diff --git a/cloog-core/test/yosrf.cloog b/cloog-core/test/yosrf.cloog new file mode 100644 index 0000000..1661ef7 --- /dev/null +++ b/cloog-core/test/yosrf.cloog @@ -0,0 +1,65 @@ +# language: FORTRAN +f + +# One parameter : n +1 3 +# n 1 +1 0 1 +# We want to set the parameter names... +1 +# and 'n' is the name of the unique parameter +n + +2 # Number of statements: 2. + +1 +# {i, j | 1<=i<=n-1; i+1<=j<=n} +4 5 +# i j n 1 +1 1 0 0 -1 +1 -1 0 1 -1 +1 -1 1 0 -1 +1 0 -1 1 0 +0 0 0 + +1 +# {i, j, k | 1<=i<=n-1; i+1<=j<=n i+1<=k<=n} +6 6 +# i j k n 1 +1 1 0 0 0 -1 +1 -1 0 0 1 -1 +1 -1 1 0 0 -1 +1 0 -1 0 1 0 +1 -1 0 1 0 -1 +1 0 0 -1 1 0 +0 0 0 +# We want to let CLooG set the iterator names. +0 + +2 +# Scattering functions +1 6 +# c1 i j n 1 +0 1 -1 0 0 0 + +1 7 +# c1 i j k n 1 +0 1 0 0 -1 0 0 +1 +proc + +2 +# Scattering functions +3 8 +# c1 c2 c3 i j n 1 +0 1 0 0 -1 0 0 0 +0 0 1 0 0 0 0 0 +0 0 0 1 0 0 0 0 + +3 9 +# c1 c2 c3 i j k n 1 +0 1 0 0 0 0 -1 0 0 +0 0 1 0 0 0 0 0 -1 +0 0 0 1 0 0 -1 0 0 +0 + diff --git a/cloog-core/test/yosrf.f b/cloog-core/test/yosrf.f new file mode 100644 index 0000000..2d8efad --- /dev/null +++ b/cloog-core/test/yosrf.f @@ -0,0 +1,21 @@ +! Generated from ../../../git/cloog/test/yosrf.cloog by CLooG 0.14.0-136-gb91ef26 gmp bits in 0.01s. +IF (n >= 2) THEN + DO j=2, n + S1(1,j) + END DO + DO proc=2, n-1 + DO i=1, proc-1 + DO j=i+1, n + S2(i,j,proc) + END DO + END DO + DO j=proc+1, n + S1(proc,j) + END DO + END DO + DO i=1, n-1 + DO j=i+1, n + S2(i,j,n) + END DO + END DO +END IF |