cpp: void kernel_durbin(int n,\nDATA_TYPE POLYBENCH_2D(y,N,N,n,n),\nDATA_TYPE POLYBENCH_2D(sum,N,N,n,n),\nDATA_TYPE POLYBENCH_1D(alpha,N,n),\nDATA_TYPE POLYBENCH_1D(beta,N,n),\nDATA_TYPE POLYBENCH_1D(r,N,n),\nDATA_TYPE POLYBENCH_1D(out,N,n))\n{\nint i, k;\n\n#pragma scop\ny[0][0] = r[0];\nbeta[0] = 1;\nalpha[0] = r[0];\nfor (k = 1; k < _PB_N; k++)\n{\nbeta[k] = beta[k-1] - alpha[k-1] * alpha[k-1] * beta[k-1];\nsum[0][k] = r[k];\nfor (i = 0; i <= k - 1; i++)\nsum[i+1][k] = sum[i][k] + r[k-i-1] * y[i][k-1];\nalpha[k] = -sum[k][k] * beta[k];\nfor (i = 0; i <= k-1; i++)\ny[i][k] = y[i][k-1] + alpha[k] * y[k-i-1][k-1];\ny[k][k] = alpha[k];\n}\nfor (i = 0; i < _PB_N; i++)\nout[i] = y[i][_PB_N-1];\n#pragma endscop\n\n}
fortran: subroutine kernel_durbin(n, y, sumArray, alpha, beta, r,  &\noutArray)\nimplicit none\nDATA_TYPE, dimension(n, n) :: y\nDATA_TYPE, dimension(n, n) :: sumArray\nDATA_TYPE, dimension(n) :: beta\nDATA_TYPE, dimension(n) :: alpha\nDATA_TYPE, dimension(n) :: r\nDATA_TYPE, dimension(n) :: outArray\ninteger :: i, k, n\n\n!$pragma scop\ny(1, 1) = r(1)\nbeta(1) = 1\nalpha(1) = r(1)\ndo k = 2, _PB_N\nbeta(k) = beta(k - 1) - (alpha(k - 1) * alpha(k - 1) * &\nbeta(k -1))\nsumArray(k, 1) = r(k)\ndo i = 1, k - 1\nsumArray(k, i + 1) = sumArray(k, i) + &\n(r(k - i) * y(k - 1, i))\nend do\nalpha(k) = alpha(k) - (sumArray(k, k) * beta(k))\ndo i = 1, k - 1\ny(k, i) = y(k - 1, i) + (alpha(k) * y(k - 1, k - i))\nend do\ny(k, k) = alpha(k)\nend do\n\ndo i = 1, _PB_N\noutArray(i) = y(_PB_N, i)\nend do\n!$pragma endscop\nend subroutine