4 origtype = "mat" + str(x)
5 trantype = "mat" + str(y)
7 origtype = origtype + "x" + str(y)
8 trantype = trantype + "x" + str(x)
9 print trantype + " transpose(" + origtype + " m)\n{"
10 print " " + trantype + " t;"
12 # The obvious implementation of transpose
15 print " t[" + str(j) + "][" + str(i) + "] =",
16 print "m[" + str(i) + "][" + str(j) + "];"
21 gen(2,3) # mat2x3 means 2 columns, 3 rows