Struct caminos_lib::routing::EachLengthSourceAdaptiveRouting [−][src]
pub struct EachLengthSourceAdaptiveRouting {
pub routing: Box<dyn InstantiableSourceRouting>,
}
Expand description
Encapsulation of SourceRouting, a variant of SourceAdaptiveRouting. Stores in the packet one path of each length. Set label equal to the path length minus the smallest length.
Fields
routing: Box<dyn InstantiableSourceRouting>
The base routing
Trait Implementations
Compute the list of allowed exits.
fn initialize_routing_info(
&self,
routing_info: &RefCell<RoutingInfo>,
topology: &dyn Topology,
current_router: usize,
target_server: usize,
rng: &RefCell<StdRng>
)
fn initialize_routing_info(
&self,
routing_info: &RefCell<RoutingInfo>,
topology: &dyn Topology,
current_router: usize,
target_server: usize,
rng: &RefCell<StdRng>
)
Initialize the routing info of the packet. Called when the first phit of the packet leaves the server and enters a router.
fn update_routing_info(
&self,
routing_info: &RefCell<RoutingInfo>,
topology: &dyn Topology,
current_router: usize,
_current_port: usize,
target_server: usize,
_rng: &RefCell<StdRng>
)
fn update_routing_info(
&self,
routing_info: &RefCell<RoutingInfo>,
topology: &dyn Topology,
current_router: usize,
_current_port: usize,
target_server: usize,
_rng: &RefCell<StdRng>
)
Updates the routing info of the packet. Called when the first phit of the packet leaves a router and enters another router. Values are of the router being entered into.
Prepares the routing to be utilized. Perhaps by precomputing routing tables.
fn performed_request(
&self,
_requested: &CandidateEgress,
_routing_info: &RefCell<RoutingInfo>,
_topology: &dyn Topology,
_current_router: usize,
_target_server: usize,
_num_virtual_channels: usize,
_rng: &RefCell<StdRng>
)
fn performed_request(
&self,
_requested: &CandidateEgress,
_routing_info: &RefCell<RoutingInfo>,
_topology: &dyn Topology,
_current_router: usize,
_target_server: usize,
_num_virtual_channels: usize,
_rng: &RefCell<StdRng>
)
To be called by the router when one of the candidates is requested.
To optionally write routing statistics into the simulation output.
Clears all collected statistics