aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/polybench-syn/stencils/jacobi-2d.c
diff options
context:
space:
mode:
authorNadesh Ramanathan <nadeshramanathan88@gmail.com>2020-11-11 19:47:42 +0000
committerNadesh Ramanathan <nadeshramanathan88@gmail.com>2020-11-11 19:47:42 +0000
commit95861dbef966e2cb612b303615681fc29c3acd3d (patch)
treee3bff372bdb4b769ec6fb54077e30bda406ef9ee /benchmarks/polybench-syn/stencils/jacobi-2d.c
parent47bad8cabe00a40723ce04852d02e7527473f3c3 (diff)
downloadvericert-kvx-95861dbef966e2cb612b303615681fc29c3acd3d.tar.gz
vericert-kvx-95861dbef966e2cb612b303615681fc29c3acd3d.zip
polybench edits
Diffstat (limited to 'benchmarks/polybench-syn/stencils/jacobi-2d.c')
-rw-r--r--benchmarks/polybench-syn/stencils/jacobi-2d.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/benchmarks/polybench-syn/stencils/jacobi-2d.c b/benchmarks/polybench-syn/stencils/jacobi-2d.c
index 3a5b43c..11349f4 100644
--- a/benchmarks/polybench-syn/stencils/jacobi-2d.c
+++ b/benchmarks/polybench-syn/stencils/jacobi-2d.c
@@ -9,6 +9,7 @@
*/
/* jacobi-2d.c: this file is part of PolyBench/C */
+#include "../include/misc.h"
#define plus(i) i = i + ONE
static
@@ -24,8 +25,8 @@ void init_array (int n,
for (i = 0; i < n; plus(i))
for (j = 0; j < n; plus(j))
{
- A[i][j] = ((int) i*(j+TWO) + TWO) / n;
- B[i][j] = ((int) i*(j+THREE) + THREE) / n;
+ A[i][j] = divider(((int) i*(j+TWO) + TWO), n);
+ B[i][j] = divider(((int) i*(j+THREE) + THREE), n);
}
}
@@ -61,7 +62,6 @@ void kernel_jacobi_2d(int tsteps,
int ONE = 1;
int TWO = 2;
-#pragma scop
for (t = 0; t < tsteps; plus(t))
{
for (i = 1; i < n - ONE; plus(i))
@@ -75,7 +75,6 @@ void kernel_jacobi_2d(int tsteps,
A[i][j] = A[i][j] >> TWO;
}
}
-#pragma endscop
}