Communicator

Trait Communicator 

Source
pub trait Communicator:
    Send
    + Sync
    + Debug {
    // Required methods
    fn send(&self, data: &[Complex64], dest: usize, tag: usize) -> FFTResult<()>;
    fn recv(
        &self,
        src: usize,
        tag: usize,
        size: usize,
    ) -> FFTResult<Vec<Complex64>>;
    fn all_to_all(&self, senddata: &[Complex64]) -> FFTResult<Vec<Complex64>>;
    fn barrier(&self) -> FFTResult<()>;
    fn size(&self) -> usize;
    fn rank(&self) -> usize;
}
Expand description

Trait for communication between processes

Required Methods§

Source

fn send(&self, data: &[Complex64], dest: usize, tag: usize) -> FFTResult<()>

Send data to another process

Source

fn recv(&self, src: usize, tag: usize, size: usize) -> FFTResult<Vec<Complex64>>

Receive data from another process

Source

fn all_to_all(&self, senddata: &[Complex64]) -> FFTResult<Vec<Complex64>>

All-to-all communication

Source

fn barrier(&self) -> FFTResult<()>

Barrier synchronization

Source

fn size(&self) -> usize

Get the number of processes

Source

fn rank(&self) -> usize

Get the current process rank

Implementors§