pub struct Divide<SubU, T, const N: usize>(/* private fields */);Expand description
Strategy that splits the underlier into SubU-sized lanes, applies the sub-packing
PackedPrimitiveType<SubU, F>’s op to each lane, and recombines — a generic fallback for
packings that lack a specialized full-width Square, InvertOrZero, or WideMul. The
sub-underlier SubU is a PhantomData parameter so the packing type T stays last for the
macro’s Divide<SubU, $name, N> form.
N is the lane count: callers always pass N = <U as Divisible<SubU>>::N (or the literal it
works out to). Square/InvertOrZero stream through Divisible and ignore N, but it is
still required so every Divide instantiation names its lane count explicitly. WideMul must
defer reduction, so it materializes one unreduced product per lane in an N-element
LaneWideProduct — and an associated const can’t be an array length without
generic_const_exprs, which is why N is a const generic rather than read from Divisible.
Trait Implementations§
Source§impl<U, SubU, F, const N: usize> InvertOrZero for Divide<SubU, PackedPrimitiveType<U, F>, N>where
U: UnderlierType + Divisible<SubU>,
SubU: UnderlierType,
F: BinaryField,
PackedPrimitiveType<SubU, F>: InvertOrZero,
impl<U, SubU, F, const N: usize> InvertOrZero for Divide<SubU, PackedPrimitiveType<U, F>, N>where
U: UnderlierType + Divisible<SubU>,
SubU: UnderlierType,
F: BinaryField,
PackedPrimitiveType<SubU, F>: InvertOrZero,
Source§impl<U, SubU, F, const N: usize> Square for Divide<SubU, PackedPrimitiveType<U, F>, N>where
U: UnderlierType + Divisible<SubU>,
SubU: UnderlierType,
F: BinaryField,
PackedPrimitiveType<SubU, F>: Square,
impl<U, SubU, F, const N: usize> Square for Divide<SubU, PackedPrimitiveType<U, F>, N>where
U: UnderlierType + Divisible<SubU>,
SubU: UnderlierType,
F: BinaryField,
PackedPrimitiveType<SubU, F>: Square,
Source§impl<SubU, T, const N: usize> TransparentWrapper<T> for Divide<SubU, T, N>
impl<SubU, T, const N: usize> TransparentWrapper<T> for Divide<SubU, T, N>
§fn wrap_ref(s: &Inner) -> &Self
fn wrap_ref(s: &Inner) -> &Self
§fn wrap_mut(s: &mut Inner) -> &mut Self
fn wrap_mut(s: &mut Inner) -> &mut Self
§fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
fn wrap_slice(s: &[Inner]) -> &[Self]where
Self: Sized,
§fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
fn wrap_slice_mut(s: &mut [Inner]) -> &mut [Self]where
Self: Sized,
§fn peel_ref(s: &Self) -> &Inner
fn peel_ref(s: &Self) -> &Inner
§fn peel_mut(s: &mut Self) -> &mut Inner
fn peel_mut(s: &mut Self) -> &mut Inner
§fn peel_slice(s: &[Self]) -> &[Inner]where
Self: Sized,
fn peel_slice(s: &[Self]) -> &[Inner]where
Self: Sized,
§fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where
Self: Sized,
fn peel_slice_mut(s: &mut [Self]) -> &mut [Inner]where
Self: Sized,
Source§impl<U, SubU, F, const N: usize> WideMul for Divide<SubU, PackedPrimitiveType<U, F>, N>where
U: UnderlierType + Divisible<SubU>,
SubU: UnderlierType,
F: BinaryField,
PackedPrimitiveType<SubU, F>: WideMul,
<PackedPrimitiveType<SubU, F> as WideMul>::Output: Copy + Default,
impl<U, SubU, F, const N: usize> WideMul for Divide<SubU, PackedPrimitiveType<U, F>, N>where
U: UnderlierType + Divisible<SubU>,
SubU: UnderlierType,
F: BinaryField,
PackedPrimitiveType<SubU, F>: WideMul,
<PackedPrimitiveType<SubU, F> as WideMul>::Output: Copy + Default,
Auto Trait Implementations§
impl<SubU, T, const N: usize> Freeze for Divide<SubU, T, N>where
T: Freeze,
impl<SubU, T, const N: usize> RefUnwindSafe for Divide<SubU, T, N>where
T: RefUnwindSafe,
SubU: RefUnwindSafe,
impl<SubU, T, const N: usize> Send for Divide<SubU, T, N>
impl<SubU, T, const N: usize> Sync for Divide<SubU, T, N>
impl<SubU, T, const N: usize> Unpin for Divide<SubU, T, N>
impl<SubU, T, const N: usize> UnsafeUnpin for Divide<SubU, T, N>where
T: UnsafeUnpin,
impl<SubU, T, const N: usize> UnwindSafe for Divide<SubU, T, N>where
T: UnwindSafe,
SubU: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<I, T> TransparentWrapperAlloc<I> for T
impl<I, T> TransparentWrapperAlloc<I> for T
§fn wrap_vec(s: Vec<Inner>) -> Vec<Self>where
Self: Sized,
fn wrap_vec(s: Vec<Inner>) -> Vec<Self>where
Self: Sized,
§fn wrap_box(s: Box<Inner>) -> Box<Self>
fn wrap_box(s: Box<Inner>) -> Box<Self>
§fn wrap_rc(s: Rc<Inner>) -> Rc<Self>
fn wrap_rc(s: Rc<Inner>) -> Rc<Self>
Rc to the inner type into an Rc to the wrapper type.§fn wrap_arc(s: Arc<Inner>) -> Arc<Self>
fn wrap_arc(s: Arc<Inner>) -> Arc<Self>
Arc to the inner type into an Arc to the wrapper type.