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