void foo(int[m, n] a) { int[n, m] b; for (int i = 0, n) { for (int j = 0, m) b[i, j] = a[j, i]; } foo(b); }