Trait DistributedArray

Source
pub trait DistributedArray: ArrayProtocol {
    // Required methods
    fn distribution_info(&self) -> HashMap<String, String>;
    fn gather(&self) -> CoreResult<Box<dyn ArrayProtocol>>;
    fn scatter(&self, chunks: usize) -> CoreResult<Box<dyn DistributedArray>>;
    fn is_distributed(&self) -> bool;
}
Expand description

Trait for distributed arrays that can span multiple machines.

Required Methods§

Source

fn distribution_info(&self) -> HashMap<String, String>

Get information about the distribution of this array.

Source

fn gather(&self) -> CoreResult<Box<dyn ArrayProtocol>>

Gather the distributed array to a single node.

Source

fn scatter(&self, chunks: usize) -> CoreResult<Box<dyn DistributedArray>>

Scatter a regular array to a distributed array.

Source

fn is_distributed(&self) -> bool

Check if this array is distributed.

Implementors§

Source§

impl<T, D> DistributedArray for DistributedNdarray<T, D>
where T: Clone + Send + Sync + 'static + Zero + Div<f64, Output = T> + Default + One, D: Dimension + Clone + Send + Sync + 'static + RemoveAxis,

Source§

impl<T: Clone + Send + Sync + 'static> DistributedArray for MockDistributedArray<T>