Skip to main content

FabricConfig

Struct FabricConfig 

Source
pub struct FabricConfig { /* private fields */ }
Expand description

Configuration structure for a fabric

Implementations§

Source§

impl FabricConfig

Source

pub fn new( num_columns: usize, num_rows: usize, num_ports_per_node: usize, ports_per_node_limit: Option<usize>, cycles_per_hop: usize, cycles_overhead: usize, rx_buffer_bytes: usize, tx_buffer_bytes: usize, port_bits_per_tick: usize, ) -> Self

Source

pub fn max_num_ports(&self) -> usize

Returns the maximum number of ports in the fabric

Source

pub fn num_ports(&self) -> usize

Returns the number of ports in a fabric.

Source

pub fn port_indices(&self) -> &Vec<usize>

Returns the actual port indices

Source

pub fn col_row_port_to_fabric_port_index( &self, col: usize, row: usize, port: usize, ) -> usize

Given a column, row and port index, return the overall index in the fabric ports

Ports laid out as ports[col][row][port]

Source

pub fn fabric_port_index_to_col_row_port( &self, fabric_port_index: usize, ) -> (usize, usize, usize)

Source

pub fn node_num_ingress_egress_ports(&self, col: usize, row: usize) -> usize

Source

pub fn max_x(&self) -> usize

Source

pub fn max_y(&self) -> usize

Source

pub fn num_columns(&self) -> usize

Source

pub fn num_rows(&self) -> usize

Source

pub fn num_ports_per_node(&self) -> usize

Source

pub fn cycles_per_hop(&self) -> usize

Source

pub fn cycles_overhead(&self) -> usize

Source

pub fn port_bits_per_tick(&self) -> usize

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.