diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-11-14 16:23:00 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-11-14 16:23:00 +0000 |
commit | 4201a38997543ceedad52f77b992dd8eb4a2ee5e (patch) | |
tree | 16b4adb28028e21f3ae9d46539167ece72c1c4a8 /benchmarks/polybench-syn/linear-algebra/kernels/atas.c | |
parent | 43773b8d4a69dfd30759db2a5026a4f44cdac4cb (diff) | |
parent | 95861dbef966e2cb612b303615681fc29c3acd3d (diff) | |
download | vericert-4201a38997543ceedad52f77b992dd8eb4a2ee5e.tar.gz vericert-4201a38997543ceedad52f77b992dd8eb4a2ee5e.zip |
Merge branch 'dev-experiments'
Diffstat (limited to 'benchmarks/polybench-syn/linear-algebra/kernels/atas.c')
-rw-r--r-- | benchmarks/polybench-syn/linear-algebra/kernels/atas.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/benchmarks/polybench-syn/linear-algebra/kernels/atas.c b/benchmarks/polybench-syn/linear-algebra/kernels/atas.c index a051046..7bd0151 100644 --- a/benchmarks/polybench-syn/linear-algebra/kernels/atas.c +++ b/benchmarks/polybench-syn/linear-algebra/kernels/atas.c @@ -9,6 +9,8 @@ */ /* atax.c: this file is part of PolyBench/C */ +#include "../../include/misc.h" + #define plus(i) i = i + ONE static void init_array (int m, int n, @@ -21,15 +23,13 @@ void init_array (int m, int n, fn = (int)n; for (i = 0; i < n; plus(i)) - x[i] = ONE + (i / fn); + x[i] = ONE + divider(i, fn); for (i = 0; i < m; plus(i)) for (j = 0; j < n; plus(j)) - A[i][j] = (int) ((i+j) % n) / (5*m); + A[i][j] = (int) divider(smodulo(i+j, n),(5*m)); } - - static int print_array(int n, int y[ 42 + 0]) @@ -46,8 +46,6 @@ int print_array(int n, } - - static void kernel_atax(int m, int n, int A[ 38 + 0][42 + 0], @@ -58,7 +56,6 @@ void kernel_atax(int m, int n, int i, j; int ONE = 1; -#pragma scop for (i = 0; i < n; plus(i)) y[i] = 0; for (i = 0; i < m; plus(i)) @@ -69,7 +66,6 @@ void kernel_atax(int m, int n, for (j = 0; j < n; plus(j)) y[j] = y[j] + A[i][j] * tmp[i]; } -#pragma endscop } |