diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-11-17 09:11:01 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-11-17 09:11:01 +0000 |
commit | 7d9057a6ca6f591851ee5c6e8d74e3833aae3903 (patch) | |
tree | 7577f9b16008a7ceb6158eb836909f1fa636dbc8 /benchmarks/polybench-syn/stencils/fdtd-2d.c | |
parent | 6aa7ea660f19e7bde920b5b22c1c0c93f1be2fd7 (diff) | |
parent | 38b249970456a55f0a69ff28070887367e113205 (diff) | |
download | vericert-kvx-7d9057a6ca6f591851ee5c6e8d74e3833aae3903.tar.gz vericert-kvx-7d9057a6ca6f591851ee5c6e8d74e3833aae3903.zip |
Merge branch 'dev-experiments'
Diffstat (limited to 'benchmarks/polybench-syn/stencils/fdtd-2d.c')
-rw-r--r-- | benchmarks/polybench-syn/stencils/fdtd-2d.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/benchmarks/polybench-syn/stencils/fdtd-2d.c b/benchmarks/polybench-syn/stencils/fdtd-2d.c index f9f4a84..d92183e 100644 --- a/benchmarks/polybench-syn/stencils/fdtd-2d.c +++ b/benchmarks/polybench-syn/stencils/fdtd-2d.c @@ -13,6 +13,13 @@ #include <stdio.h> #endif +#ifndef SYNTHESIS +#include <stdio.h> +#endif + + +#include "../include/misc.h" + #define plus(i) i = i + ONE static void init_array (int tmax, @@ -25,18 +32,16 @@ void init_array (int tmax, { int i, j; int ONE = 1; - int TWO = 1; - int THREE = 1; for (i = 0; i < tmax; plus(i)) _fict_[i] = (int) i; for (i = 0; i < nx; plus(i)) for (j = 0; j < ny; plus(j)) - { - ex[i][j] = ((int) i*(j+ONE)) / nx; - ey[i][j] = ((int) i*(j+TWO)) / ny; - hz[i][j] = ((int) i*(j+THREE)) / nx; - } + { + ex[i][j] = sdivider(i*(j+1) , nx); + ey[i][j] = sdivider(i*(j+2) , ny); + hz[i][j] = sdivider(i*(j+3) , nx); + } } @@ -70,7 +75,7 @@ int print_array(int nx, #ifndef SYNTHESIS printf("finished: %u\n", res); #endif - + return res; } |