Function make_node_counters

Source
pub(crate) fn make_node_counters<Node: Idx>(
    node_flow_data: &NodeFlowData<Node>,
    priority_list: &[Node],
) -> NodeCounters<Node>
Expand description

Uses the graph information in node_flow_data, together with a given permutation of all nodes in the graph, to create physical counters and counter expressions for each node in the underlying graph.

The given list must contain exactly one copy of each node in the underlying balanced-flow graph. The order of nodes is used as a hint to influence counter allocation:

  • Earlier nodes are more likely to receive counter expressions.
  • Later nodes are more likely to receive physical counters.