aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/polybench-syn/linear-algebra/blas/gemver.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/polybench-syn/linear-algebra/blas/gemver.c')
-rw-r--r--benchmarks/polybench-syn/linear-algebra/blas/gemver.c14
1 files 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);
}
}