cpp: void print_array(int nx, int ny,\nDATA_TYPE POLYBENCH_1D(s,NY,ny),\nDATA_TYPE POLYBENCH_1D(q,NX,nx))\n\n{\nint i;\n\nfor (i = 0; i < ny; i++) {\nfprintf (stderr, DATA_PRINTF_MODIFIER, s[i]);\nif (i % 20 == 0) fprintf (stderr, "\n");\n}\nfor (i = 0; i < nx; i++) {\nfprintf (stderr, DATA_PRINTF_MODIFIER, q[i]);\nif (i % 20 == 0) fprintf (stderr, "\n");\n}\nfprintf (stderr, "\n");\n}
fortran: subroutine print_array(nx, ny, s, q)\nimplicit none\n\nDATA_TYPE, dimension(ny) :: s\nDATA_TYPE, dimension(nx) :: q\ninteger :: nx,ny\ninteger :: i\ndo i = 1, ny\nwrite(0, DATA_PRINTF_MODIFIER) s(i)\nif (mod(i - 1, 80) == 0) then\nwrite(0, *)\nend if\nend do\n\ndo i = 1, nx\nwrite(0, DATA_PRINTF_MODIFIER) q(i)\nif (mod(i - 1, 80) == 0) then\nwrite(0, *)\nend if\nend do\nwrite(0, *)\nend subroutine