2 /* Layout of a systolic array:
10 yn → □ → ... → □ → yn'
14 g(m,f) : y,x1,...,xm -> x1',...,xm',y'
15 constructs a single row of size m.
17 h(n,m,f) : y1,...,yn,x1,...,xm -> x1',...,xm',yn',...,y1'
18 constructs an array of size nxm.
20 f is the function computed by each cell, which must take
21 exactly two inputs and yield exactly two outputs. */
24 g(m,f) = (f, r(m-1)) : (_, g(m-1,f));
28 (!,r(n-1),s(m), (_,s(n-1),r(m) : g(m,f)))) :
39 // sample cell function