RosettaCodeData/Task/Matrix-multiplication/Futhark/matrix-multiplication.futhark

5 lines
158 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
fun main(x: [n][m]int, y: [m][p]int): [n][p]int =
map (fn xr => map (fn yc => reduce (+) 0 (zipWith (*) xr yc))
(transpose y))
x