pub struct Minor<C: ?Sized, U> { /* private fields */ }Expand description
Processor-minor, data-major serial composition.
Minor changes only the loop nest used by block() and inplace().
Scalar process() and the signal semantics are unchanged.
Without Minor, tuple and array composition are stage-major:
one stage runs over the whole slice and then the next stage runs over the
whole slice. With Minor, the outer loop is over samples and each sample is
pushed through the wrapped stages before moving to the next sample.
Use this when:
- the wrapped stages are small and fine-grained
- per-stage state/configuration is small enough to keep hot while stepping sample by sample
- there is little value in preserving each stage’s own
block()/inplace()specialization - tuple composition must cross an intermediate type where the downstream
stage is not
SplitInplaceover that type
Avoid this when:
- a stage has a meaningful
block()specialization that benefits from seeing a long contiguous slice - SIMD or autovectorization needs stage-major contiguous data
- cache behavior is dominated by streaming through data rather than by keeping tiny stage state hot
- an explicit scratch buffer via
Majoris a better fit
In short: Minor trades stage-wise streaming locality for per-sample stage
locality. It is often good for tiny recursive stages, but it can be the
wrong choice for stages whose slice path exists to improve cache use or SIMD.
Implementations§
Trait Implementations§
impl<C: Copy + ?Sized, U: Copy> Copy for Minor<C, U>
Source§impl<X, U, C, S> SplitInplace<X, S> for Minor<C, U>where
X: Copy,
Self: SplitProcess<X, X, S>,
impl<X, U, C, S> SplitInplace<X, S> for Minor<C, U>where
X: Copy,
Self: SplitProcess<X, X, S>,
Source§impl<X: Copy, C, S> SplitProcess<X, X, [S]> for Minor<[C], X>where
C: SplitProcess<X, X, S>,
A chain of multiple small filters of the same type
impl<X: Copy, C, S> SplitProcess<X, X, [S]> for Minor<[C], X>where
C: SplitProcess<X, X, S>,
A chain of multiple small filters of the same type
Source§impl<X: Copy, U: Copy, Y, C0, C1, S0, S1> SplitProcess<X, Y, (S0, S1)> for Minor<(C0, C1), U>where
C0: SplitProcess<X, U, S0>,
C1: SplitProcess<U, Y, S1>,
impl<X: Copy, U: Copy, Y, C0, C1, S0, S1> SplitProcess<X, Y, (S0, S1)> for Minor<(C0, C1), U>where
C0: SplitProcess<X, U, S0>,
C1: SplitProcess<U, Y, S1>,
Source§impl<X: Copy, Y: Copy, C, S, const N: usize> SplitProcess<X, Y, [S; N]> for Minor<[C; N], Y>where
C: SplitProcess<X, Y, S> + SplitProcess<Y, Y, S>,
A chain of multiple small filters of the same type
impl<X: Copy, Y: Copy, C, S, const N: usize> SplitProcess<X, Y, [S; N]> for Minor<[C; N], Y>where
C: SplitProcess<X, Y, S> + SplitProcess<Y, Y, S>,
A chain of multiple small filters of the same type