/** * 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