From 25f9100da11ccea1d8b5c24160270be425f2cab2 Mon Sep 17 00:00:00 2001 From: Nadesh Ramanathan Date: Sun, 15 Nov 2020 12:44:39 +0000 Subject: lu fix --- benchmarks/polybench-syn/linear-algebra/solvers/lu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmarks/polybench-syn/linear-algebra/solvers/lu.c') diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/lu.c b/benchmarks/polybench-syn/linear-algebra/solvers/lu.c index 56dadd7..a7ec246 100644 --- a/benchmarks/polybench-syn/linear-algebra/solvers/lu.c +++ b/benchmarks/polybench-syn/linear-algebra/solvers/lu.c @@ -29,7 +29,7 @@ void init_array (int n, { for (j = 0; j <= i; plus(j)) A[i][j] = sdivider(smodulo(-j, n), n) + ONE; - for (j = plus(i); j < n; plus(j)) { + for (j = i+1; j < n; plus(j)) { A[i][j] = 0; } A[i][i] = 1; -- cgit From 38b249970456a55f0a69ff28070887367e113205 Mon Sep 17 00:00:00 2001 From: Nadesh Ramanathan Date: Tue, 17 Nov 2020 09:06:04 +0000 Subject: final checks reworked and including compilation time in script --- .../polybench-syn/linear-algebra/solvers/lu.c | 34 +++++----------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'benchmarks/polybench-syn/linear-algebra/solvers/lu.c') diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/lu.c b/benchmarks/polybench-syn/linear-algebra/solvers/lu.c index a7ec246..1365f54 100644 --- a/benchmarks/polybench-syn/linear-algebra/solvers/lu.c +++ b/benchmarks/polybench-syn/linear-algebra/solvers/lu.c @@ -16,6 +16,10 @@ #include "../../include/misc.h" +#ifndef SYNTHESIS +#include +#endif + #define plus(i) i = i + ONE static @@ -53,30 +57,6 @@ void init_array (int n, } - - -/* -static -void print_array(int n, - int A[ 40 + 0][40 + 0]) - -{ - int i, j; - - fprintf(stderr, "==BEGIN DUMP_ARRAYS==\n"); - fprintf(stderr, "begin dump: %s", "A"); - for (i = 0; i < n; i++) - for (j = 0; j < n; j++) { - if ((i * n + j) % 20 == 0) fprintf (stderr, "\n"); - fprintf (stderr, "%d ", A[i][j]); - } - fprintf(stderr, "\nend dump: %s\n", "A"); - fprintf(stderr, "==END DUMP_ARRAYS==\n"); -} -*/ - - - static void kernel_lu(int n, int A[ 40][40]) @@ -110,6 +90,9 @@ int check_array(int n, for (i = 0; i < n; plus(i)) for (j = 0; j < n; plus(j)) if(A[i][j] !=0) res = 1; + #ifndef SYNTHESIS + printf("finished: %u\n", res); + #endif return res; } @@ -126,11 +109,8 @@ int main() init_array (n, A); - - kernel_lu (n, A); - return check_array(n, A); return 0; -- cgit