3 def gen_matrix(x
, y
= 0):
8 type = type + "x" + str(y
)
9 print type + " matrixCompMult(" + type + " x, " + type + " y)\n{"
10 print " " + type + " z;"
13 print " z[" + str(i
) + "] = x[" + str(i
) + "] * y[" + str(i
) + "];"
23 gen_matrix(2,3) # mat2x3 means 2 columns, 3 rows