View difference between Paste ID: D1YFAtRS and GxaRj9Bp
SHOW: | | - or go back to the newest paste.
1
for i, j in [0...m), [0...n)
2
t1[i][j] = inp[?swizzle1(i,j)][j] // Step 1: column shuffle
3
for i, j in [0...m), [0...n)
4
t2[i][j] = t1[i][?swizzle2(j,i)] // Step 2: row shuffle
5
for i, j in [0...m), [0...n)
6
out[i][j] = t2[?swizzle3(i,j)][j] // Step 3: column shuffle