cpp: void kernel_jacobi_1d_imper(int tsteps,\nint n,\nDATA_TYPE POLYBENCH_1D(A,N,n),\nDATA_TYPE POLYBENCH_1D(B,N,n))\n{\nint t, i, j;\n\n#pragma scop\nfor (t = 0; t < _PB_TSTEPS; t++)\n{\nfor (i = 1; i < _PB_N - 1; i++)\nB[i] = 0.33333 * (A[i-1] + A[i] + A[i + 1]);\nfor (j = 1; j < _PB_N - 1; j++)\nA[j] = B[j];\n}\n#pragma endscop\n\n}
fortran: subroutine kernel_jacobi1d(tsteps, n, a, b)\nimplicit none\n\nDATA_TYPE, dimension(n) :: a\nDATA_TYPE, dimension(n) :: b\ninteger :: n, tsteps\ninteger :: i, t, j\n!$pragma scop\ndo t = 1, _PB_TSTEPS\ndo i = 2, _PB_N - 1\nb(i) = 0.33333D0 * (a(i - 1) + a(i) + a(i + 1))\nend do\n\ndo j = 2, _PB_N -1\na(j) = b(j)\nend do\nend do\n!$pragma endscop\nend subroutine