From f21f8ed249030032f4b0a99c0fcd7e210ddb2e1b Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 10 Jul 2021 21:06:31 +0200 Subject: Add more documentation and clean up benchmarks --- benchmarks/polybench-syn/stencils/Makefile | 6 ++++++ benchmarks/polybench-syn/stencils/adi.c | 23 +++++++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 benchmarks/polybench-syn/stencils/Makefile (limited to 'benchmarks/polybench-syn/stencils') diff --git a/benchmarks/polybench-syn/stencils/Makefile b/benchmarks/polybench-syn/stencils/Makefile new file mode 100644 index 0000000..cf23dc6 --- /dev/null +++ b/benchmarks/polybench-syn/stencils/Makefile @@ -0,0 +1,6 @@ +all: adi fdtd-2d heat-3d jacobi-1d jacobi-2d seidel-2d + +include ../common.mk + +adi.v: adi.c + $(VERICERT) $(VERICERT_OPTS) -O0 -finline $< -o $@ diff --git a/benchmarks/polybench-syn/stencils/adi.c b/benchmarks/polybench-syn/stencils/adi.c index ec2bf2a..2f4aca3 100644 --- a/benchmarks/polybench-syn/stencils/adi.c +++ b/benchmarks/polybench-syn/stencils/adi.c @@ -15,28 +15,23 @@ #include #endif -#define plus(i) i = i + ONE - static -void init_array (int n, - int u[ 20 + 0][20 + 0]) +void init_array (int n, int u[ 20 + 0][20 + 0]) { int i, j; for (i = 0; i < n; i++) for (j = 0; j < n; j++) - { - u[i][j] = divider((int)(i + n-j) ,n); - } + { + u[i][j] = divider((int)(i + n-j), n); + } } static -int print_array(int n, - int u[ 20 + 0][20 + 0]) - +int print_array(int n, int u[ 20 + 0][20 + 0]) { int i, j; int res = 0; @@ -53,10 +48,10 @@ int print_array(int n, } static void kernel_adi(int tsteps, int n, - int u[ 20 + 0][20 + 0], - int v[ 20 + 0][20 + 0], - int p[ 20 + 0][20 + 0], - int q[ 20 + 0][20 + 0]) + int u[ 20 + 0][20 + 0], + int v[ 20 + 0][20 + 0], + int p[ 20 + 0][20 + 0], + int q[ 20 + 0][20 + 0]) { int t, i, j; int B1, B2; -- cgit From 6797b6b0472e87c1ef5edb84f81a16b73577f754 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 10 Jul 2021 21:12:37 +0200 Subject: Fix Makefiles slightly --- benchmarks/polybench-syn/stencils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmarks/polybench-syn/stencils') diff --git a/benchmarks/polybench-syn/stencils/Makefile b/benchmarks/polybench-syn/stencils/Makefile index cf23dc6..d2e1c9b 100644 --- a/benchmarks/polybench-syn/stencils/Makefile +++ b/benchmarks/polybench-syn/stencils/Makefile @@ -1,4 +1,4 @@ -all: adi fdtd-2d heat-3d jacobi-1d jacobi-2d seidel-2d +TARGETS := adi fdtd-2d heat-3d jacobi-1d jacobi-2d seidel-2d include ../common.mk -- cgit