Skip to main content

gen_any_codelet

Macro gen_any_codelet 

Source
gen_any_codelet!() { /* proc-macro */ }
Expand description

Generate a complete FFT codelet for any user-specified size N.

Routes to the most appropriate emitter based on the size:

  • Direct set {2, 4, 8, 16, 32, 64}: optimised non-twiddle codelet.
  • Winograd odd {3, 5, 7}: Winograd minimum-multiply codelet.
  • Rader hardcoded {11, 13}: straight-line Rader cyclic-convolution codelet.
  • Smooth-7 composites (all prime factors in {2, 3, 5, 7}): runtime-delegating wrapper using Plan::dft_1d (mixed-radix path).
  • Primes p ≤ 1021: runtime-delegating wrapper (runtime Rader/Generic).
  • All other sizes: runtime-delegating Bluestein wrapper via Plan::dft_1d.

§Syntax

gen_any_codelet!(8);     // emits codelet_any_8  (direct notw codelet)
gen_any_codelet!(15);    // emits codelet_any_15 (runtime mixed-radix wrapper)
gen_any_codelet!(2003);  // emits codelet_any_2003 (Bluestein wrapper)

The emitted function signature is:

pub fn codelet_any_{N}<T: crate::kernel::Float>(
    x: &mut [crate::kernel::Complex<T>],
    sign: i32,
)