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