diff options
author | Yann Herklotz <git@yannherklotz.com> | 2021-07-10 21:06:31 +0200 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2021-07-10 21:06:31 +0200 |
commit | f21f8ed249030032f4b0a99c0fcd7e210ddb2e1b (patch) | |
tree | 6edc3fe2c6cdedf190a72352c4706df399358206 /benchmarks/polybench-syn/stencils | |
parent | 817aea90deff7f381bf50d0cb7cbfc96c1c9ea7f (diff) | |
download | vericert-f21f8ed249030032f4b0a99c0fcd7e210ddb2e1b.tar.gz vericert-f21f8ed249030032f4b0a99c0fcd7e210ddb2e1b.zip |
Add more documentation and clean up benchmarks
Diffstat (limited to 'benchmarks/polybench-syn/stencils')
-rw-r--r-- | benchmarks/polybench-syn/stencils/Makefile | 6 | ||||
-rw-r--r-- | benchmarks/polybench-syn/stencils/adi.c | 23 |
2 files changed, 15 insertions, 14 deletions
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 <stdio.h> #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; |