[][src]Trait caminos_lib::routing::Routing

pub trait Routing: Debug {
    pub fn next(
        &self,
        routing_info: &RoutingInfo,
        topology: &dyn Topology,
        current_router: usize,
        target_server: usize,
        num_virtual_channels: usize,
        rng: &RefCell<StdRng>
    ) -> Vec<CandidateEgress>;
pub fn initialize_routing_info(
        &self,
        routing_info: &RefCell<RoutingInfo>,
        topology: &dyn Topology,
        current_router: usize,
        target_server: usize,
        rng: &RefCell<StdRng>
    );
pub fn update_routing_info(
        &self,
        routing_info: &RefCell<RoutingInfo>,
        topology: &dyn Topology,
        current_router: usize,
        current_port: usize,
        target_server: usize,
        rng: &RefCell<StdRng>
    );
pub fn initialize(
        &mut self,
        topology: &Box<dyn Topology>,
        rng: &RefCell<StdRng>
    ); }

A routing algorithm to provide candidate routes when the Router requires. It may store/use information in the RoutingInfo. A Routing does not receive information about the state of buffers or similar. Such a mechanism should be given as a VirtualChannelPolicy.

Required methods

pub fn next(
    &self,
    routing_info: &RoutingInfo,
    topology: &dyn Topology,
    current_router: usize,
    target_server: usize,
    num_virtual_channels: usize,
    rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>
[src]

Compute the list of allowed exits.

pub fn initialize_routing_info(
    &self,
    routing_info: &RefCell<RoutingInfo>,
    topology: &dyn Topology,
    current_router: usize,
    target_server: usize,
    rng: &RefCell<StdRng>
)
[src]

Initialize the routing info of the packet. Called when the first phit of the packet leaves the server and enters a router.

pub fn update_routing_info(
    &self,
    routing_info: &RefCell<RoutingInfo>,
    topology: &dyn Topology,
    current_router: usize,
    current_port: usize,
    target_server: usize,
    rng: &RefCell<StdRng>
)
[src]

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.

pub fn initialize(
    &mut self,
    topology: &Box<dyn Topology>,
    rng: &RefCell<StdRng>
)
[src]

Prepares the routing to be utilized. Perhaps by precomputing routing tables.

Loading content...

Implementors

impl Routing for Mindless[src]

impl Routing for Shortest[src]

impl Routing for SumRouting[src]

impl Routing for Valiant[src]

impl Routing for WeighedShortest[src]

impl Routing for DOR[src]

impl Routing for O1TURN[src]

impl Routing for OmniDimensionalDeroute[src]

impl Routing for ValiantDOR[src]

impl<R: SourceRouting + Debug> Routing for R[src]

Loading content...