Skip to main content

Morsel

Trait Morsel 

Source
pub trait Morsel: IoConsumer + Send {
    // Required methods
    fn state(&self) -> State;
    fn compute(&mut self) -> VortexResult<MorselOutput>;
}
Expand description

A morsel produces arrays for an authorised piece of work.

state() is called before every compute(), and compute() only when state() is NeedsCompute. Batches preserve selected input-row order within and across calls. A morsel moves between threads with the run that owns it.

Required Methods§

Source

fn state(&self) -> State

Reports what the morsel needs next without doing work.

Source

fn compute(&mut self) -> VortexResult<MorselOutput>

Advances CPU work. Only called when state is NeedsCompute.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§