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/medley/floyd-warshall.c | |
parent | 43773b8d4a69dfd30759db2a5026a4f44cdac4cb (diff) | |
parent | 95861dbef966e2cb612b303615681fc29c3acd3d (diff) | |
download | vericert-kvx-4201a38997543ceedad52f77b992dd8eb4a2ee5e.tar.gz vericert-kvx-4201a38997543ceedad52f77b992dd8eb4a2ee5e.zip |
Merge branch 'dev-experiments'
Diffstat (limited to 'benchmarks/polybench-syn/medley/floyd-warshall.c')
-rw-r--r-- | benchmarks/polybench-syn/medley/floyd-warshall.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/benchmarks/polybench-syn/medley/floyd-warshall.c b/benchmarks/polybench-syn/medley/floyd-warshall.c index 46f6774..48a7e8d 100644 --- a/benchmarks/polybench-syn/medley/floyd-warshall.c +++ b/benchmarks/polybench-syn/medley/floyd-warshall.c @@ -9,6 +9,7 @@ */ /* floyd-warshall.c: this file is part of PolyBench/C */ +#include "../include/misc.h" #define plus(i) i = i + ONE static @@ -17,14 +18,12 @@ void init_array (int n, { int i, j; 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 == 0 || (i+j)%N7==0 || (i+j)%N11 == 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; } } @@ -58,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)) @@ -66,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 } |