[][src]Trait caminos_lib::policies::VirtualChannelPolicy

pub trait VirtualChannelPolicy {
    pub fn filter(
        &self,
        candidates: Vec<CandidateEgress>,
        router: &dyn Router,
        info: &RequestInfo<'_>,
        topology: &dyn Topology,
        rng: &RefCell<StdRng>
    ) -> Vec<CandidateEgress>;
pub fn need_server_ports(&self) -> bool;
pub fn need_port_average_queue_length(&self) -> bool;
pub fn need_port_last_transmission(&self) -> bool; }

How virtual channels are selected for a packet They provide the function filter(Vec) -> Vec It needs: rng, self.virtual_ports(credits and length), phit.packet.routing_info.borrow().hops, server_ports, topology.{distance,neighbour}, port_average_neighbour_queue_length, port_last_transmission We could also provide functions to declare which aspects must be computed. Thus allowing to both share when necessary and to not computing ti when unnecessary.

Required methods

pub fn filter(
    &self,
    candidates: Vec<CandidateEgress>,
    router: &dyn Router,
    info: &RequestInfo<'_>,
    topology: &dyn Topology,
    rng: &RefCell<StdRng>
) -> Vec<CandidateEgress>
[src]

Apply the policy over a list of candidates and return the candidates that fulfil the policy requirements. candidates: the list to be filtered. router: the router in which the decision is being made. topology: The network topology. rng: the global random number generator.

pub fn need_server_ports(&self) -> bool[src]

pub fn need_port_average_queue_length(&self) -> bool[src]

pub fn need_port_last_transmission(&self) -> bool[src]

Loading content...

Implementors

impl VirtualChannelPolicy for EnforceFlowControl[src]

impl VirtualChannelPolicy for Hops[src]

impl VirtualChannelPolicy for LabelSaturate[src]

impl VirtualChannelPolicy for LabelTransform[src]

impl VirtualChannelPolicy for LowestLabel[src]

impl VirtualChannelPolicy for LowestSinghWeight[src]

impl VirtualChannelPolicy for NegateLabel[src]

impl VirtualChannelPolicy for OccupancyFunction[src]

impl VirtualChannelPolicy for Random[src]

impl VirtualChannelPolicy for Shortest[src]

impl VirtualChannelPolicy for VecLabel[src]

impl VirtualChannelPolicy for WideHops[src]

Loading content...