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