pub trait Merger: Default {
    type Chunk: Container;
    type Time;

    // Required methods
    fn merge(
        &mut self,
        list1: Vec<Self::Chunk>,
        list2: Vec<Self::Chunk>,
        output: &mut Vec<Self::Chunk>,
        stash: &mut Vec<Self::Chunk>,
    );
    fn extract(
        &mut self,
        merged: Vec<Self::Chunk>,
        upper: AntichainRef<'_, Self::Time>,
        frontier: &mut Antichain<Self::Time>,
        readied: &mut Vec<Self::Chunk>,
        kept: &mut Vec<Self::Chunk>,
        stash: &mut Vec<Self::Chunk>,
    );
    fn account(chunk: &Self::Chunk) -> (usize, usize, usize, usize);
}
Expand description

A trait to describe interesting moments in a merge batcher.

Required Associated Types§

source

type Chunk: Container

The internal representation of chunks of data.

source

type Time

The type of time in frontiers to extract updates.

Required Methods§

source

fn merge( &mut self, list1: Vec<Self::Chunk>, list2: Vec<Self::Chunk>, output: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>, )

Merge chains into an output chain.

source

fn extract( &mut self, merged: Vec<Self::Chunk>, upper: AntichainRef<'_, Self::Time>, frontier: &mut Antichain<Self::Time>, readied: &mut Vec<Self::Chunk>, kept: &mut Vec<Self::Chunk>, stash: &mut Vec<Self::Chunk>, )

Extract ready updates based on the upper frontier.

source

fn account(chunk: &Self::Chunk) -> (usize, usize, usize, usize)

Account size and allocation changes. Returns a tuple of (records, size, capacity, allocations).

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<D, T, R> Merger for ColumnationMerger<(D, T, R)>
where D: Columnation + Ord + Data, T: Columnation + Ord + PartialOrder + Data, R: Columnation + Semigroup + 'static,

source§

impl<D, T, R> Merger for VecMerger<(D, T, R)>
where D: Data, T: Ord + PartialOrder + Clone + 'static, R: Semigroup + 'static,

§

type Time = T

§

type Chunk = Vec<(D, T, R)>

source§

impl<MC> Merger for FlatcontainerMerger<MC>
where for<'a> MC: MergerChunk + Clone + 'static + ReserveItems<<MC as Region>::ReadItem<'a>> + Push<<MC as Region>::ReadItem<'a>> + Push<(MC::Data<'a>, MC::Time<'a>, &'a MC::DiffOwned)> + Push<(MC::Data<'a>, MC::Time<'a>, MC::Diff<'a>)>, for<'a> MC::Time<'a>: PartialOrder<MC::TimeOwned> + Copy + IntoOwned<'a, Owned = MC::TimeOwned>, for<'a> MC::Diff<'a>: IntoOwned<'a, Owned = MC::DiffOwned>, for<'a> MC::TimeOwned: Ord + PartialOrder + PartialOrder<MC::Time<'a>> + Data, for<'a> MC::DiffOwned: Default + Semigroup + Semigroup<MC::Diff<'a>> + Data,

§

type Time = <MC as MergerChunk>::TimeOwned

§

type Chunk = FlatStack<MC>