diff options
59 files changed, 1311 insertions, 0 deletions
diff --git a/CHiLL.pdf b/CHiLL.pdf Binary files differnew file mode 100644 index 0000000..2e10748 --- /dev/null +++ b/CHiLL.pdf diff --git a/buildall b/buildall new file mode 100755 index 0000000..cb203d4 --- /dev/null +++ b/buildall @@ -0,0 +1,140 @@ +#!/bin/bash +# Set up environment to build and install CHiLL at Blue Waters + +echo "This script needs to be customized before it is executed..." +exit + +# Package directory ... +export PACKAGEDIR=/sw/sources/chill + +# Directory to build in ... +export BUILDDIR=/u/sciteam/rwheeler/scratch + +# Directory to install permanent files ... +export INSTALLDIR=/sw/xe/chill + +# Install tools in seperate directories +export AUTOCONFINSTALLDIR=$INSTALLDIR/autoconf +export GCCINSTALLDIR=$INSTALLDIR/gcc +export BOOSTINSTALLDIR=$INSTALLDIR/boost +export ROSEINSTALLDIR=$INSTALLDIR/rose + +# Packages already installed +export JAVA_HOME=/opt/java/jdk1.7.0_45 +export PYTHON_INCDIR=/usr/include/python2.6 +export PYTHON_LIBDIR=/usr/lib64 +export PYTHON_VERSION=2.6 + +# Create toplevel build and installation directories if they do not already exist... +if false; then +mkdir -p $BUILDDIR +mkdir -p $INSTALLDIR +mkdir -p $INSTALLDIR/lib +mkdir -p $INSTALLDIR/lib64 +mkdir -p $INSTALLDIR/bin +mkdir -p $AUTOCONFINSTALLDIR +mkdir -p $GCCINSTALLDIR +mkdir -p $BOOSTINSTALLDIR +mkdir -p $ROSEINSTALLDIR +fi + +export PATH=$INSTALLDIR/bin:$PATH + +# +# Unpack needed items into the build area +# +if false; then +cd $BUILDDIR +for dir in autoconf/autoconf-2.69 gcc/gcc-4.4.7 boost/boost_1_45_0 rose/edg4x-rose chill/chill-0.2.1; do + mkdir -p `dirname $dir`/build + echo checking for `basename $dir` + if [ ! -d $dir ]; then + echo unpacking tar file `basename $dir`.tar.gz + (cd `dirname $dir`; tar xzf $PACKAGEDIR/`basename $dir`.tar.gz) + fi +done +fi + +# +# Configure and build autoconf +# +if false; then +echo Building autoconf +cd $BUILDDIR/autoconf/build +../autoconf-2.69/configure --prefix=$AUTOCONFINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +export PATH=$AUTOCONFINSTALLDIR/bin:$PATH + +# +# Configure and build gcc +# +if false; then +echo Building gcc +cd $BUILDDIR/gcc/build +../gcc-4.4.7/configure --prefix=$GCCINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +export PATH=$GCCINSTALLDIR/bin:$PATH +export LD_LIBRARY_PATH=$GCCINSTALLDIR/lib64:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$GCCINSTALLDIR/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH + +# +# Configure and build boost +# +if false; then +echo Building Boost +export BOOSTLIBSNEEDED=date_time,filesystem,program_options,regex,system,thread,wave,iostreams +cd $BUILDDIR/boost/boost_1_45_0 +./bootstrap.sh --prefix=$BOOSTINSTALLDIR --with-libraries=$BOOSTLIBSNEEDED +./bjam install --prefix=$BOOSTINSTALLDIR --build-dir=../build +fi + +export LD_LIBRARY_PATH=$BOOSTINSTALLDIR/lib:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$BOOSTINSTALLDIR/include:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH + +# +# Configure and build rose +# +if false; then +echo Building Rose +cd $BUILDDIR/rose/build +../edg4x-rose/configure --prefix=$ROSEINSTALLDIR --with-boost=$BOOSTINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +export LD_LIBRARY_PATH=$ROSEINSTALLDIR/lib:$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH +export C_INCLUDE_PATH=$ROSEINSTALLDIR/include:$ROSEINSTALLDIR/include/rose:$C_INCLUDE_PATH +export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH + +# +# Configure and build chill +# +if false; then +echo Building CHiLL +cd $BUILDDIR/chill/chill-0.2.1 +./configure --with-interface=python --prefix=$INSTALLDIR --with-rose=$ROSEINSTALLDIR --with-boost=$BOOSTINSTALLDIR +make -j`nproc` +make -j`nproc` install +fi + +# +# Test CHiLL +# +if false; then +echo Testing CHiLL +cd $BUILDDIR/chill/chill-0.2.1/test-chill +./runtests +fi + +echo Remember to set your paths to... +echo +echo 'export PATH=$PATH:'$INSTALLDIR/bin +echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'$ROSEINSTALLDIR/lib:$BOOSTINSTALLDIR/lib:$JAVA_HOME/jre/lib/amd64/server diff --git a/test-chill/mm.c b/test-chill/mm.c new file mode 100644 index 0000000..354d929 --- /dev/null +++ b/test-chill/mm.c @@ -0,0 +1,15 @@ + + +void mm(float **A, float **B, float **C, int ambn, int an, int bm) { + int i, j, n; + + for(i = 0; i < an; i++) { + for(j = 0; j < bm; j++) { + C[i][j] = 0.0f; + for(n = 0; n < ambn; n++) { + C[i][j] += A[i][n] * B[n][j]; + } + } + } +} + diff --git a/test-chill/runtests b/test-chill/runtests new file mode 100755 index 0000000..e5021f8 --- /dev/null +++ b/test-chill/runtests @@ -0,0 +1,17 @@ +#/bin/sh +for file in *.py; do + echo -n "Testing " + echo -n $file | sed 's/test_//g;s/.py//g' + echo -n " ... " + ../chill $file > /dev/null 2>&1 + cmp -s rose_mm.c with/$file.out + if [ $? -eq 0 ] + then echo OK + else + cmp -s rose_mm.c without/$file.out + if [ $? -eq 0 ]; then echo OK; else echo failed; fi + fi +done +rm rose_mm.c + + diff --git a/test-chill/test_distribute.py b/test-chill/test_distribute.py new file mode 100644 index 0000000..760d29f --- /dev/null +++ b/test-chill/test_distribute.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +distribute([0,1], 1) +print_code() diff --git a/test-chill/test_fuse.py b/test-chill/test_fuse.py new file mode 100644 index 0000000..32c594c --- /dev/null +++ b/test-chill/test_fuse.py @@ -0,0 +1,14 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +distribute([0,1], 1) +print_code() +fuse([0,1], 1) +print_code() diff --git a/test-chill/test_known.py b/test-chill/test_known.py new file mode 100644 index 0000000..662d7d0 --- /dev/null +++ b/test-chill/test_known.py @@ -0,0 +1,11 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +print_code() diff --git a/test-chill/test_known_2.py b/test-chill/test_known_2.py new file mode 100644 index 0000000..5b16325 --- /dev/null +++ b/test-chill/test_known_2.py @@ -0,0 +1,9 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known(['ambn > 0', 'an > 0', 'bm > 0']) +print_code() diff --git a/test-chill/test_original.py b/test-chill/test_original.py new file mode 100644 index 0000000..2d17799 --- /dev/null +++ b/test-chill/test_original.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known(['ambn > 4', 'an > 0', 'bm > 0']) +peel(1,3,4) +print_code() +original() +print_code() diff --git a/test-chill/test_peel.py b/test-chill/test_peel.py new file mode 100644 index 0000000..bb6c583 --- /dev/null +++ b/test-chill/test_peel.py @@ -0,0 +1,10 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known(['ambn > 4', 'an > 0', 'bm > 0']) +peel(1,3,4) +print_code() diff --git a/test-chill/test_permute.py b/test-chill/test_permute.py new file mode 100644 index 0000000..ff4a42a --- /dev/null +++ b/test-chill/test_permute.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +permute([3,2,1]) +print_code() diff --git a/test-chill/test_print_code.py b/test-chill/test_print_code.py new file mode 100644 index 0000000..004c46c --- /dev/null +++ b/test-chill/test_print_code.py @@ -0,0 +1,8 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +print_code() diff --git a/test-chill/test_print_dep.py b/test-chill/test_print_dep.py new file mode 100644 index 0000000..a3dee29 --- /dev/null +++ b/test-chill/test_print_dep.py @@ -0,0 +1,8 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +print_dep() diff --git a/test-chill/test_print_space.py b/test-chill/test_print_space.py new file mode 100644 index 0000000..2f8f678 --- /dev/null +++ b/test-chill/test_print_space.py @@ -0,0 +1,8 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +print_space() diff --git a/test-chill/test_reverse.py b/test-chill/test_reverse.py new file mode 100644 index 0000000..a97c611 --- /dev/null +++ b/test-chill/test_reverse.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known(['ambn > 0', 'an > 0', 'bm > 0']) +distribute([0,1],1) +reverse([1],1) +reverse([1],2) +print_code() diff --git a/test-chill/test_scale.py b/test-chill/test_scale.py new file mode 100644 index 0000000..ee8455d --- /dev/null +++ b/test-chill/test_scale.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known(['ambn > 0', 'an > 0', 'bm > 0']) +distribute([0,1],1) +scale([1],1,4) +scale([1],2,4) +print_code() diff --git a/test-chill/test_shift.py b/test-chill/test_shift.py new file mode 100644 index 0000000..b3fc6ab --- /dev/null +++ b/test-chill/test_shift.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +shift([1],1,4) +print_code() diff --git a/test-chill/test_shift_to.py b/test-chill/test_shift_to.py new file mode 100644 index 0000000..f3537c5 --- /dev/null +++ b/test-chill/test_shift_to.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +shift_to(1,1,4) +print_code() diff --git a/test-chill/test_skew.py b/test-chill/test_skew.py new file mode 100644 index 0000000..c7271f4 --- /dev/null +++ b/test-chill/test_skew.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +skew([1],1,[4]) +print_code() diff --git a/test-chill/test_tile.py b/test-chill/test_tile.py new file mode 100644 index 0000000..fbe0368 --- /dev/null +++ b/test-chill/test_tile.py @@ -0,0 +1,14 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +#known('ambn > 0') +#known('an > 0') +#known('bm > 0') +#tile(1, 1, 4, 1) +#tile(1, 3, 4, 2) +tile(0,2,4) +print_code() diff --git a/test-chill/test_unroll.py b/test-chill/test_unroll.py new file mode 100644 index 0000000..39dd0db --- /dev/null +++ b/test-chill/test_unroll.py @@ -0,0 +1,13 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +distribute([0,1], 1) +unroll(1, 3, 4) +print_code() diff --git a/test-chill/test_unroll_extra.py b/test-chill/test_unroll_extra.py new file mode 100644 index 0000000..929313c --- /dev/null +++ b/test-chill/test_unroll_extra.py @@ -0,0 +1,12 @@ +from chill import * + +source('mm.c') +procedure('mm') +#format: rose +loop(0) + +known('ambn > 0') +known('an > 0') +known('bm > 0') +unroll_extra(1, 2, 4) +print_code() diff --git a/test-chill/testrun.log b/test-chill/testrun.log new file mode 100644 index 0000000..7611517 --- /dev/null +++ b/test-chill/testrun.log @@ -0,0 +1,16 @@ +Test Run By bobw on Mon Sep 21 12:59:26 2015 +Native configuration is x86_64-unknown-linux-gnu + + === tests === + +Schedule of variations: + unix + +Running target unix +Using /usr/local/share/dejagnu/baseboards/unix.exp as board description file for target. +Using /usr/local/share/dejagnu/config/unix.exp as generic interface file for target. +WARNING: Couldn't find tool config file for unix, using default. + + === Summary === + +runtest completed at Mon Sep 21 12:59:26 2015 diff --git a/test-chill/with/test_distribute.py.out b/test-chill/with/test_distribute.py.out new file mode 100644 index 0000000..f071e87 --- /dev/null +++ b/test-chill/with/test_distribute.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); +} diff --git a/test-chill/with/test_fuse.py.out b/test-chill/with/test_fuse.py.out new file mode 100644 index 0000000..062bd15 --- /dev/null +++ b/test-chill/with/test_fuse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_known.py.out b/test-chill/with/test_known.py.out new file mode 100644 index 0000000..062bd15 --- /dev/null +++ b/test-chill/with/test_known.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_known_2.py.out b/test-chill/with/test_known_2.py.out new file mode 100644 index 0000000..062bd15 --- /dev/null +++ b/test-chill/with/test_known_2.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_original.py.out b/test-chill/with/test_original.py.out new file mode 100644 index 0000000..3d84795 --- /dev/null +++ b/test-chill/with/test_original.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + C[t2][t4] += (A[t2][1] * B[1][t4]); + C[t2][t4] += (A[t2][2] * B[2][t4]); + C[t2][t4] += (A[t2][3] * B[3][t4]); + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_peel.py.out b/test-chill/with/test_peel.py.out new file mode 100644 index 0000000..3d84795 --- /dev/null +++ b/test-chill/with/test_peel.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + C[t2][t4] += (A[t2][1] * B[1][t4]); + C[t2][t4] += (A[t2][2] * B[2][t4]); + C[t2][t4] += (A[t2][3] * B[3][t4]); + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_permute.py.out b/test-chill/with/test_permute.py.out new file mode 100644 index 0000000..709b7ae --- /dev/null +++ b/test-chill/with/test_permute.py.out @@ -0,0 +1,22 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= ambn - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 <= 0) + for (t6 = 0; t6 <= an - 1; t6 += 1) { + C[t6][t4] = 0.0f; + C[t6][t4] += (A[t6][t2] * B[t2][t4]); + } + else + for (t6 = 0; t6 <= an - 1; t6 += 1) + C[t6][t4] += (A[t6][t2] * B[t2][t4]); +} diff --git a/test-chill/with/test_print_code.py.out b/test-chill/with/test_print_code.py.out new file mode 100644 index 0000000..f6e21a7 --- /dev/null +++ b/test-chill/with/test_print_code.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/with/test_print_dep.py.out b/test-chill/with/test_print_dep.py.out new file mode 100644 index 0000000..f6e21a7 --- /dev/null +++ b/test-chill/with/test_print_dep.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/with/test_print_space.py.out b/test-chill/with/test_print_space.py.out new file mode 100644 index 0000000..f6e21a7 --- /dev/null +++ b/test-chill/with/test_print_space.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/with/test_reverse.py.out b/test-chill/with/test_reverse.py.out new file mode 100644 index 0000000..1e9c9b6 --- /dev/null +++ b/test-chill/with/test_reverse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = -an + 1; t2 <= 0; t2 += 1) + for (t4 = -bm + 1; t4 <= 0; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[-t2][-t4] += (A[-t2][t6] * B[t6][-t4]); +} diff --git a/test-chill/with/test_scale.py.out b/test-chill/with/test_scale.py.out new file mode 100644 index 0000000..dff7515 --- /dev/null +++ b/test-chill/with/test_scale.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 4) + for (t4 = 0; t4 <= 4 * bm - 4; t4 += 4) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4 / 4] += (A[t2 / 4][t6] * B[t6][t4 / 4]); +} diff --git a/test-chill/with/test_shift.py.out b/test-chill/with/test_shift.py.out new file mode 100644 index 0000000..6eaa244 --- /dev/null +++ b/test-chill/with/test_shift.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (4 <= t2) + C[t2 - 4][t4] += (A[t2 - 4][0] * B[0][t4]); + if (4 <= t2) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += (A[t2 - 4][t6] * B[t6][t4]); + } + else if (4 <= t2) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += (A[t2 - 4][t6] * B[t6][t4]); +} diff --git a/test-chill/with/test_shift_to.py.out b/test-chill/with/test_shift_to.py.out new file mode 100644 index 0000000..01c7ff8 --- /dev/null +++ b/test-chill/with/test_shift_to.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 4; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2 - 4][t4] = 0.0f; + C[t2 - 4][t4] += (A[t2 - 4][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += (A[t2 - 4][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_skew.py.out b/test-chill/with/test_skew.py.out new file mode 100644 index 0000000..b3da044 --- /dev/null +++ b/test-chill/with/test_skew.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (t2 % 4 == 0) + C[t2 / 4][t4] += (A[t2 / 4][0] * B[0][t4]); + } + else if (t2 % 4 == 0) + C[t2 / 4][t4] += (A[t2 / 4][0] * B[0][t4]); + if (t2 % 4 == 0) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4] += (A[t2 / 4][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_tile.py.out b/test-chill/with/test_tile.py.out new file mode 100644 index 0000000..47bae06 --- /dev/null +++ b/test-chill/with/test_tile.py.out @@ -0,0 +1,26 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t8; + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= an) + for (t2 = 0; t2 <= bm - 1; t2 += 4) + for (t4 = 0; t4 <= an - 1; t4 += 1) + for (t6 = t2; t6 <= __rose_lt(bm - 1,t2 + 3); t6 += 1) { + if (1 <= ambn) { + C[t4][t6] = 0.0f; + C[t4][t6] += (A[t4][0] * B[0][t6]); + } + for (t8 = 1; t8 <= ambn - 1; t8 += 1) + C[t4][t6] += (A[t4][t8] * B[t8][t6]); + if (ambn <= 0) + C[t4][t6] = 0.0f; + } +} diff --git a/test-chill/with/test_unroll.py.out b/test-chill/with/test_unroll.py.out new file mode 100644 index 0000000..7770c60 --- /dev/null +++ b/test-chill/with/test_unroll.py.out @@ -0,0 +1,38 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + over1 = ambn % 4; + for (t6 = 0; t6 <= -over1 + ambn - 1; t6 += 4) { + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + C[t2][t4] += (A[t2][t6 + 1] * B[t6 + 1][t4]); + C[t2][t4] += (A[t2][t6 + 2] * B[t6 + 2][t4]); + C[t2][t4] += (A[t2][t6 + 3] * B[t6 + 3][t4]); + } + for (t6 = __rose_gt(0,ambn - over1); t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } +} diff --git a/test-chill/with/test_unroll_extra.py.out b/test-chill/with/test_unroll_extra.py.out new file mode 100644 index 0000000..232d1c8 --- /dev/null +++ b/test-chill/with/test_unroll_extra.py.out @@ -0,0 +1,51 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) { + over1 = bm % 4; + for (t4 = 0; t4 <= -over1 + bm - 1; t4 += 4) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + C[t2][t4 + 1] = 0.0f; + C[t2][t4 + 1] += (A[t2][0] * B[0][t4 + 1]); + C[t2][t4 + 2] = 0.0f; + C[t2][t4 + 2] += (A[t2][0] * B[0][t4 + 2]); + C[t2][t4 + 3] = 0.0f; + C[t2][t4 + 3] += (A[t2][0] * B[0][t4 + 3]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) { + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + C[t2][t4 + 1] += (A[t2][t6] * B[t6][t4 + 1]); + C[t2][t4 + 2] += (A[t2][t6] * B[t6][t4 + 2]); + C[t2][t4 + 3] += (A[t2][t6] * B[t6][t4 + 3]); + } + } + for (t4 = __rose_gt(bm - over1,0); t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += (A[t2][0] * B[0][t4]); + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += (A[t2][t6] * B[t6][t4]); + } + } +} diff --git a/test-chill/without/test_distribute.py.out b/test-chill/without/test_distribute.py.out new file mode 100644 index 0000000..e90e735 --- /dev/null +++ b/test-chill/without/test_distribute.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; +} diff --git a/test-chill/without/test_fuse.py.out b/test-chill/without/test_fuse.py.out new file mode 100644 index 0000000..e8f0856 --- /dev/null +++ b/test-chill/without/test_fuse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_known.py.out b/test-chill/without/test_known.py.out new file mode 100644 index 0000000..e8f0856 --- /dev/null +++ b/test-chill/without/test_known.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_known_2.py.out b/test-chill/without/test_known_2.py.out new file mode 100644 index 0000000..e8f0856 --- /dev/null +++ b/test-chill/without/test_known_2.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_original.py.out b/test-chill/without/test_original.py.out new file mode 100644 index 0000000..15cfc7b --- /dev/null +++ b/test-chill/without/test_original.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + C[t2][t4] += A[t2][1] * B[1][t4]; + C[t2][t4] += A[t2][2] * B[2][t4]; + C[t2][t4] += A[t2][3] * B[3][t4]; + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_peel.py.out b/test-chill/without/test_peel.py.out new file mode 100644 index 0000000..15cfc7b --- /dev/null +++ b/test-chill/without/test_peel.py.out @@ -0,0 +1,34 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + C[t2][t4] += A[t2][1] * B[1][t4]; + C[t2][t4] += A[t2][2] * B[2][t4]; + C[t2][t4] += A[t2][3] * B[3][t4]; + for (t6 = 4; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_permute.py.out b/test-chill/without/test_permute.py.out new file mode 100644 index 0000000..5aeecfd --- /dev/null +++ b/test-chill/without/test_permute.py.out @@ -0,0 +1,22 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= ambn - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 <= 0) + for (t6 = 0; t6 <= an - 1; t6 += 1) { + C[t6][t4] = 0.0f; + C[t6][t4] += A[t6][t2] * B[t2][t4]; + } + else + for (t6 = 0; t6 <= an - 1; t6 += 1) + C[t6][t4] += A[t6][t2] * B[t2][t4]; +} diff --git a/test-chill/without/test_print_code.py.out b/test-chill/without/test_print_code.py.out new file mode 100644 index 0000000..f96eb53 --- /dev/null +++ b/test-chill/without/test_print_code.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/without/test_print_dep.py.out b/test-chill/without/test_print_dep.py.out new file mode 100644 index 0000000..f96eb53 --- /dev/null +++ b/test-chill/without/test_print_dep.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/without/test_print_space.py.out b/test-chill/without/test_print_space.py.out new file mode 100644 index 0000000..f96eb53 --- /dev/null +++ b/test-chill/without/test_print_space.py.out @@ -0,0 +1,24 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= bm) + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (1 <= ambn) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + } + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + if (ambn <= 0) + C[t2][t4] = 0.0f; + } +} diff --git a/test-chill/without/test_reverse.py.out b/test-chill/without/test_reverse.py.out new file mode 100644 index 0000000..617d115 --- /dev/null +++ b/test-chill/without/test_reverse.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = -an + 1; t2 <= 0; t2 += 1) + for (t4 = -bm + 1; t4 <= 0; t4 += 1) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[-t2][-t4] += A[-t2][t6] * B[t6][-t4]; +} diff --git a/test-chill/without/test_scale.py.out b/test-chill/without/test_scale.py.out new file mode 100644 index 0000000..0f7be2a --- /dev/null +++ b/test-chill/without/test_scale.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 4) + for (t4 = 0; t4 <= 4 * bm - 4; t4 += 4) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4 / 4] += A[t2 / 4][t6] * B[t6][t4 / 4]; +} diff --git a/test-chill/without/test_shift.py.out b/test-chill/without/test_shift.py.out new file mode 100644 index 0000000..a26758b --- /dev/null +++ b/test-chill/without/test_shift.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (4 <= t2) + C[t2 - 4][t4] += A[t2 - 4][0] * B[0][t4]; + if (4 <= t2) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += A[t2 - 4][t6] * B[t6][t4]; + } + else if (4 <= t2) + for (t6 = 0; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += A[t2 - 4][t6] * B[t6][t4]; +} diff --git a/test-chill/without/test_shift_to.py.out b/test-chill/without/test_shift_to.py.out new file mode 100644 index 0000000..b29724c --- /dev/null +++ b/test-chill/without/test_shift_to.py.out @@ -0,0 +1,19 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 4; t2 <= an + 3; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + C[t2 - 4][t4] = 0.0f; + C[t2 - 4][t4] += A[t2 - 4][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 - 4][t4] += A[t2 - 4][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_skew.py.out b/test-chill/without/test_skew.py.out new file mode 100644 index 0000000..04c4208 --- /dev/null +++ b/test-chill/without/test_skew.py.out @@ -0,0 +1,25 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int i; + int j; + int n; + for (t2 = 0; t2 <= 4 * an - 4; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + if (t2 + 1 <= an) { + C[t2][t4] = 0.0f; + if (t2 % 4 == 0) + C[t2 / 4][t4] += A[t2 / 4][0] * B[0][t4]; + } + else if (t2 % 4 == 0) + C[t2 / 4][t4] += A[t2 / 4][0] * B[0][t4]; + if (t2 % 4 == 0) + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2 / 4][t4] += A[t2 / 4][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_tile.py.out b/test-chill/without/test_tile.py.out new file mode 100644 index 0000000..e59933e --- /dev/null +++ b/test-chill/without/test_tile.py.out @@ -0,0 +1,26 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t8; + int t6; + int t4; + int t2; + int i; + int j; + int n; + if (1 <= an) + for (t2 = 0; t2 <= bm - 1; t2 += 4) + for (t4 = 0; t4 <= an - 1; t4 += 1) + for (t6 = t2; t6 <= __rose_lt(bm - 1,t2 + 3); t6 += 1) { + if (1 <= ambn) { + C[t4][t6] = 0.0f; + C[t4][t6] += A[t4][0] * B[0][t6]; + } + for (t8 = 1; t8 <= ambn - 1; t8 += 1) + C[t4][t6] += A[t4][t8] * B[t8][t6]; + if (ambn <= 0) + C[t4][t6] = 0.0f; + } +} diff --git a/test-chill/without/test_unroll.py.out b/test-chill/without/test_unroll.py.out new file mode 100644 index 0000000..91bfa4f --- /dev/null +++ b/test-chill/without/test_unroll.py.out @@ -0,0 +1,38 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) + C[t2][t4] = 0.0f; + for (t2 = 0; t2 <= an - 1; t2 += 1) + for (t4 = 0; t4 <= bm - 1; t4 += 1) { + over1 = ambn % 4; + for (t6 = 0; t6 <= -over1 + ambn - 1; t6 += 4) { + C[t2][t4] += A[t2][t6] * B[t6][t4]; + C[t2][t4] += A[t2][t6 + 1] * B[t6 + 1][t4]; + C[t2][t4] += A[t2][t6 + 2] * B[t6 + 2][t4]; + C[t2][t4] += A[t2][t6 + 3] * B[t6 + 3][t4]; + } + for (t6 = __rose_gt(0,ambn - over1); t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } +} diff --git a/test-chill/without/test_unroll_extra.py.out b/test-chill/without/test_unroll_extra.py.out new file mode 100644 index 0000000..2126860 --- /dev/null +++ b/test-chill/without/test_unroll_extra.py.out @@ -0,0 +1,51 @@ +#define __rose_lt(x,y) ((x)<(y)?(x):(y)) +#define __rose_gt(x,y) ((x)>(y)?(x):(y)) + +void mm(float **A,float **B,float **C,int ambn,int an,int bm) +{ + int t6; + int t4; + int t2; + int chill_t12; + int chill_t11; + int chill_t10; + int chill_t9; + int chill_t8; + int chill_t7; + int chill_t6; + int chill_t5; + int chill_t4; + int over1; + int chill_t3; + int chill_t2; + int chill_t1; + int i; + int j; + int n; + over1 = 0; + for (t2 = 0; t2 <= an - 1; t2 += 1) { + over1 = bm % 4; + for (t4 = 0; t4 <= -over1 + bm - 1; t4 += 4) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + C[t2][t4 + 1] = 0.0f; + C[t2][t4 + 1] += A[t2][0] * B[0][t4 + 1]; + C[t2][t4 + 2] = 0.0f; + C[t2][t4 + 2] += A[t2][0] * B[0][t4 + 2]; + C[t2][t4 + 3] = 0.0f; + C[t2][t4 + 3] += A[t2][0] * B[0][t4 + 3]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) { + C[t2][t4] += A[t2][t6] * B[t6][t4]; + C[t2][t4 + 1] += A[t2][t6] * B[t6][t4 + 1]; + C[t2][t4 + 2] += A[t2][t6] * B[t6][t4 + 2]; + C[t2][t4 + 3] += A[t2][t6] * B[t6][t4 + 3]; + } + } + for (t4 = __rose_gt(bm - over1,0); t4 <= bm - 1; t4 += 1) { + C[t2][t4] = 0.0f; + C[t2][t4] += A[t2][0] * B[0][t4]; + for (t6 = 1; t6 <= ambn - 1; t6 += 1) + C[t2][t4] += A[t2][t6] * B[t6][t4]; + } + } +} |