From a5e65a6adc567c12f317c6a0cfd252c97365dbc5 Mon Sep 17 00:00:00 2001 From: Nadesh Ramanathan Date: Tue, 10 Nov 2020 19:47:28 +0000 Subject: fixing gemver --- benchmarks/polybench-syn/linear-algebra/blas/gemver.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/benchmarks/polybench-syn/linear-algebra/blas/gemver.c b/benchmarks/polybench-syn/linear-algebra/blas/gemver.c index a2711cb..5b627d1 100644 --- a/benchmarks/polybench-syn/linear-algebra/blas/gemver.c +++ b/benchmarks/polybench-syn/linear-algebra/blas/gemver.c @@ -9,6 +9,8 @@ */ /* gemver.c: this file is part of PolyBench/C */ +#include "../../include/misc.h" + #define plus(i) i = i + ONE static void init_array (int n, @@ -35,15 +37,15 @@ void init_array (int n, for (i = 0; i < n; plus(i)) { u1[i] = i; - u2[i] = ((i+ONE)/fn)/2; - v1[i] = ((i+ONE)/fn)/4; - v2[i] = ((i+ONE)/fn)/6; - y[i] = ((i+ONE)/fn)/8; - z[i] = ((i+ONE)/fn)/9; + u2[i] = sdivider(((i+ONE)/fn),2); + v1[i] = sdivider(((i+ONE)/fn),4); + v2[i] = sdivider(((i+ONE)/fn),6); + y[i] = sdivider(((i+ONE)/fn),8); + z[i] = sdivider(((i+ONE)/fn),9); x[i] = 0; w[i] = 0; for (j = 0; j < n; plus(j)) - A[i][j] = (int) (i*j % n) / n; + A[i][j] = (int) sdivider(smodulo(i*j, n), n); } } -- cgit