Skip to main content

ResumableSIMDSchema

Trait ResumableSIMDSchema 

Source
pub trait ResumableSIMDSchema<T, U, A = Current>: Copy
where A: Architecture,
{ type NonResumable: SIMDSchema<T, U, A> + Default; type FinalReturn; // Required methods fn init(arch: A) -> Self; fn combine_with( &self, other: <Self::NonResumable as SIMDSchema<T, U, A>>::Accumulator, ) -> Self; fn sum(&self) -> Self::FinalReturn; }
Expand description

In some contexts - it can be beneficial to begin a computation on one pair of slices and then store intermediate state for resumption on another pair of slices.

A good example of this is direct-computation of PQ distances where different chunks need to be gathered and partially accumulated before the final reduction.

The ResumableSchema provides a relatively straight-forward way of achieving this.

Required Associated Types§

Required Methods§

Source

fn init(arch: A) -> Self

Source

fn combine_with( &self, other: <Self::NonResumable as SIMDSchema<T, U, A>>::Accumulator, ) -> Self

Source

fn sum(&self) -> Self::FinalReturn

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§