Function resolve_routing

Source
pub fn resolve_routing(
    rank: usize,
    frames: impl IntoIterator<Item = RoutingFrame>,
    chooser: &mut dyn FnMut(&Choice) -> usize,
) -> Result<(bool, HashMap<usize, Vec<RoutingFrame>>), Error>
Expand description

Resolves the current set of routing frames (dests) to determine whether the message should be delivered at this rank, and which routing frames should be forwarded to peer ranks.

This is the continuation of a multicast operation: each forwarded message contains one or more RoutingFrames that represent partial routing state. This call determines how those frames propagate next.

deliver_here is true if any frame targets this rank and indicates delivery. next_steps contains the peer ranks and frames to forward.

This is also the top-level entry point for CommActor’s routing logic.