pub trait ResumableSIMDSchema<T, U, A = Current>: Copywhere
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§
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
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.