cpp: void print_array(int maxgrid,\nDATA_TYPE POLYBENCH_2D(path,MAXGRID,MAXGRID,maxgrid,maxgrid))\n{\nint i, j;\n\nfor (i = 0; i < maxgrid; i++)\nfor (j = 0; j < maxgrid; j++) {\nfprintf (stderr, DATA_PRINTF_MODIFIER, path[i][j]);\nif ((i * maxgrid + j) % 20 == 0) fprintf (stderr, "\n");\n}\nfprintf (stderr, "\n");\n}
fortran: subroutine print_array(maxgrid, path)\nimplicit none\n\ninteger :: i, j, maxgrid\nDATA_TYPE, dimension (maxgrid, maxgrid) :: path\ndo i = 1, maxgrid\ndo j = 1, maxgrid\nwrite(0, DATA_PRINTF_MODIFIER) path(j, i)\nif (mod(((i - 1) * maxgrid) + j - 1, 20) == 0) then\nwrite(0, *)\nend if\nend do\nend do\nwrite(0, *)\nend subroutine