cpp: void print_array(int nr, int nq, int np,\nDATA_TYPE POLYBENCH_3D(A,NR,NQ,NP,nr,nq,np))\n{\nint i, j, k;\n\nfor (i = 0; i < nr; i++)\nfor (j = 0; j < nq; j++)\nfor (k = 0; k < np; k++) {\nfprintf (stderr, DATA_PRINTF_MODIFIER, A[i][j][k]);\nif (i % 20 == 0) fprintf (stderr, "\n");\n}\nfprintf (stderr, "\n");\n}
fortran: subroutine print_array(a, nr, nq, np)\nimplicit none\n\nDATA_TYPE, dimension(np, nq, nr) :: a\ninteger :: nr, nq, np\ninteger :: i, j, k\ndo i = 1, nr\ndo j = 1, nq\ndo k = 1, np\nwrite(0, DATA_PRINTF_MODIFIER) a(k, j, i)\nif (mod((i - 1), 20) &\n== 0) then\nwrite(0, *)\nend if\nend do\nend do\nend do\nwrite(0, *)\nend subroutine