From 045c0dc29fc31a8d3f15da8b3130dbc4706ea581 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 13 Aug 2020 23:24:40 +0100 Subject: Add modified polybench benchmarks --- .../polybench-syn/linear-algebra/solvers/durbin.c | 102 +++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 benchmarks/polybench-syn/linear-algebra/solvers/durbin.c (limited to 'benchmarks/polybench-syn/linear-algebra/solvers/durbin.c') diff --git a/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c new file mode 100644 index 0000000..677c23c --- /dev/null +++ b/benchmarks/polybench-syn/linear-algebra/solvers/durbin.c @@ -0,0 +1,102 @@ +/** + * This version is stamped on May 10, 2016 + * + * Contact: + * Louis-Noel Pouchet + * Tomofumi Yuki + * + * Web address: http://polybench.sourceforge.net + */ +/* durbin.c: this file is part of PolyBench/C */ + + +#define plus(i) i = i + ONE +/* Include polybench common header. */ +static +void init_array (int n, + int r[ 40 + 0]) +{ + int ONE = 1; + int i, j; + + for (i = 0; i < n; plus(i)) + { + r[i] = (n+ONE-i); + } +} + + + +static +int print_array(int n, + int y[ 40 + 0]) + +{ + int ONE = 1; + int i; + int res = 0; + + for (i = 0; i < n; plus(i)) { + res += y[i]; + } + return res; +} + +static +void kernel_durbin(int n, + int r[ 40 + 0], + int y[ 40 + 0]) +{ + int z[40]; + int alpha; + int beta; + int sum; + + int ONE = 1; + int i,k; + +#pragma scop + y[0] = -r[0]; + beta = 1; + alpha = -r[0]; + + for (k = 1; k < n; plus(k)) { + beta = (ONE-alpha*alpha)*beta; + sum = 0; + for (i=0; i