Skip to main content

Transport

Trait Transport 

Source
pub trait Transport: Send {
    // Required methods
    fn send(&self, dest_rank: usize, data: &[u8]) -> Result<(), ModelError>;
    fn recv(&self, src_rank: usize) -> Result<Vec<u8>, ModelError>;
    fn barrier(&self) -> Result<(), ModelError>;
}
Expand description

Byte-level communication primitive used by aggregation strategies.

Required Methods§

Source

fn send(&self, dest_rank: usize, data: &[u8]) -> Result<(), ModelError>

Send data to the worker with the given rank.

Source

fn recv(&self, src_rank: usize) -> Result<Vec<u8>, ModelError>

Receive data from the worker with the given rank.

Source

fn barrier(&self) -> Result<(), ModelError>

Block until all workers reach the barrier.

Implementors§