cpp: void init_array (int n,\nDATA_TYPE POLYBENCH_2D(A,N,N,n,n))\n{\nint i, j;\n\nfor (i = 0; i < n; i++)\nfor (j = 0; j < n; j++)\nA[i][j] = ((DATA_TYPE) i*(j+2) + 2) / n;\n}
fortran: subroutine init_array(n, a)\nimplicit none\n\nDATA_TYPE, dimension(n, n) :: a\ninteger :: n\ninteger :: i,j\ndo i = 1, n\ndo j = 1, n\na(j, i) = ((DBLE(i - 1) * DBLE(j + 1)) + 2.0D0) / n\nend do\nend do\nend subroutine