aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-11-17 09:11:01 +0000
committerYann Herklotz <git@yannherklotz.com>2020-11-17 09:11:01 +0000
commit7d9057a6ca6f591851ee5c6e8d74e3833aae3903 (patch)
tree7577f9b16008a7ceb6158eb836909f1fa636dbc8 /benchmarks/polybench-syn/linear-algebra/solvers/trisolv.c
parent6aa7ea660f19e7bde920b5b22c1c0c93f1be2fd7 (diff)
parent38b249970456a55f0a69ff28070887367e113205 (diff)
downloadvericert-7d9057a6ca6f591851ee5c6e8d74e3833aae3903.tar.gz
vericert-7d9057a6ca6f591851ee5c6e8d74e3833aae3903.zip
Merge branch 'dev-experiments'
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;
}