aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/polybench-syn/linear-algebra/solvers
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/polybench-syn/linear-algebra/solvers')
-rw-r--r--benchmarks/polybench-syn/linear-algebra/solvers/durbin.c9
-rw-r--r--benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c13
2 files changed, 19 insertions, 3 deletions
diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c
index dd6d05e..4b1a87f 100644
--- a/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c
+++ b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c
@@ -9,6 +9,9 @@
*/
/* durbin.c: this file is part of PolyBench/C */
+#ifndef SYNTHESIS
+#include <stdio.h>
+#endif
unsigned int divider(unsigned int x, unsigned int y)
{
@@ -76,9 +79,13 @@ int print_array(int n,
int res = 0;
for (i = 0; i < n; plus(i)) {
- res += y[i];
+ res ^= y[i];
}
+#ifndef SYNTHESIS
+ printf("finished: %u\n", res);
+#endif
+
return res;
}
diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c b/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c
index 8e76231..2f636df 100644
--- a/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c
+++ b/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c
@@ -11,6 +11,11 @@
#include "../../include/misc.h"
+
+#ifndef SYNTHESIS
+#include <stdio.h>
+#endif
+
#define plus(i) i = i + ONE
static
void init_array(int n,
@@ -23,7 +28,7 @@ void init_array(int n,
for (i = 0; i < n; plus(i))
{
- x[i] = - 999;
+ x[i] = -999;
b[i] = i ;
for (j = 0; j <= i; plus(j))
L[i][j] = (int) divider((i+n-j+ONE)*(ONE+ONE), n);
@@ -42,8 +47,12 @@ int check_array(int n,
int res = 0;
int ONE = 1;
for (i = 0; i < n; plus(i)) {
- res += x[i];
+ res ^= x[i];
}
+
+#ifndef SYNTHESIS
+ printf("finished: %u\n", res);
+#endif
return res;
}