Skip to main content

layout

Function layout 

Source
pub fn layout(graph: &Graph, rows: impl Fn(Rows) -> usize) -> Layout
Expand description

Lays the values of graph out in one arena for the row counts rows, by a greedy interval colouring over their live ranges. A value lives from the first op that touches it to the last, and the outputs live to the end. Two values whose ranges overlap never share space, so an op’s inputs and outputs never alias unless the op is in place on one value. Values are placed largest first at the lowest offset that fits.