From 95861dbef966e2cb612b303615681fc29c3acd3d Mon Sep 17 00:00:00 2001 From: Nadesh Ramanathan Date: Wed, 11 Nov 2020 19:47:42 +0000 Subject: polybench edits --- benchmarks/polybench-syn/medley/floyd-warshall.c | 10 ++-------- benchmarks/polybench-syn/medley/nussinov.c | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'benchmarks/polybench-syn/medley') diff --git a/benchmarks/polybench-syn/medley/floyd-warshall.c b/benchmarks/polybench-syn/medley/floyd-warshall.c index 6c87eb7..48a7e8d 100644 --- a/benchmarks/polybench-syn/medley/floyd-warshall.c +++ b/benchmarks/polybench-syn/medley/floyd-warshall.c @@ -17,16 +17,12 @@ void init_array (int n, int path[ 60 + 0][60 + 0]) { int i, j; - int ZERO = 0; int ONE = 1; - int N7 = 7; - int N11 = 11; - int N13 = 13; for (i = 0; i < n; plus(i)) for (j = 0; j < n; plus(j)) { - path[i][j] = i*j%N7+ONE; - //if (((i+j)%N13 == ZERO || (i+j)%N7== ZERO || (i+j)%N11 == ZERO ) != 0 ) + path[i][j] = i*smodulo(j,7)+ONE; + //if (((i+j)%13 == ZERO || (i+j)%7== ZERO || (i+j)%11 == ZERO ) != 0 ) if(((smodulo((i+j),13) == (int)0 || smodulo((i+j),7) == (int)0)!=0 || smodulo((i+j),11) == (int)0 ) != 0) path[i][j] = 999; } @@ -61,7 +57,6 @@ void kernel_floyd_warshall(int n, int i, j, k; int ONE = 1; -#pragma scop for (k = 0; k < n; plus(k)) { for(i = 0; i < n; plus(i)) @@ -69,7 +64,6 @@ void kernel_floyd_warshall(int n, path[i][j] = path[i][j] < path[i][k] + path[k][j] ? path[i][j] : path[i][k] + path[k][j]; } -#pragma endscop } diff --git a/benchmarks/polybench-syn/medley/nussinov.c b/benchmarks/polybench-syn/medley/nussinov.c index f39f742..a2c3b70 100644 --- a/benchmarks/polybench-syn/medley/nussinov.c +++ b/benchmarks/polybench-syn/medley/nussinov.c @@ -11,6 +11,8 @@ typedef int base; +#include "../include/misc.h" + #define plus(i) i = i + ONE static void init_array (int n, @@ -23,7 +25,7 @@ void init_array (int n, for (i=0; i = ZERO; i=i-ONE) { for (j=i+ONE; j