aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c')
-rw-r--r--benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c13
1 files changed, 11 insertions, 2 deletions
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;
}