Skip to main content

ntt_layer

Function ntt_layer 

Source
fn ntt_layer<const LEN: usize, const ITERATIONS: usize>(
    f: &mut Array<Elem<BaseField>, U256>,
    k: &mut usize,
)
Expand description

One layer of the forward NTT butterfly.

LEN is the butterfly half-length and ITERATIONS = 128 / LEN is the number of butterfly groups in the layer. Making both compile-time constants lets the compiler eliminate the iterator length calculation (256 / (2 * LEN)) that step_by would otherwise compute with a UDIV instruction.