pub fn invert_packed_extension<F, EF>(
packed: EF::ExtensionPacking,
) -> EF::ExtensionPackingwhere
F: Field,
EF: ExtensionField<F>,Expand description
Per-lane inverse of a packed extension via Montgomery’s trick. Allocation-free.
Dispatches on F::Packing::WIDTH to a const-generic body that materializes the W
lanes via PackedFieldExtension::extract, runs batch_multiplicative_inverse_general
over a stack-sized [EF; W] buffer, and rebuilds the packed extension via
PackedFieldExtension::from_ext_fn. After monomorphization the match folds to
the single live arm.
All PackedField backends in this workspace use WIDTH ∈ {1, 2, 4, 8, 16}; the
fallback arm panics if a future backend introduces a different width.