cpp: void init_array (int n,\nDATA_TYPE POLYBENCH_2D(A,N+1,N+1,n+1,n+1),\nDATA_TYPE POLYBENCH_1D(b,N+1,n+1),\nDATA_TYPE POLYBENCH_1D(x,N+1,n+1),\nDATA_TYPE POLYBENCH_1D(y,N+1,n+1))\n{\nint i, j;\n\nfor (i = 0; i <= n; i++)\n{\nx[i] = i + 1;\ny[i] = (i+1)/n/2.0 + 1;\nb[i] = (i+1)/n/2.0 + 42;\nfor (j = 0; j <= n; j++) {\nA[i][j] = ((DATA_TYPE) (i+1)*(j+1)) / n;\n}\n}\n}
fortran: subroutine init_array(n, a, b, x, y)\nimplicit none\n\nDATA_TYPE, dimension(n + 1, n + 1) :: a\nDATA_TYPE, dimension(n + 1) :: x\nDATA_TYPE, dimension(n + 1) :: b\nDATA_TYPE, dimension(n + 1) :: y\ninteger :: n\ninteger :: i, j\n\ndo i = 1, n  + 1\nx(i) = DBLE(i)\ny(i) = (i/n/2.0D0) + 1.0D0\nb(i) = (i/n/2.0D0) + 42.0D0\ndo j = 1, n + 1\na(j, i) = (DBLE(i) * DBLE(j)) / DBLE(n)\nend do\nend do\nend subroutine