Skip to main content

gen_rdft_codelet

Macro gen_rdft_codelet 

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

Generate a real-to-half-complex (R2HC) or half-complex-to-real (HC2R) codelet.

The generated function has the same signature and produces numerically equivalent results to the hand-written codelets in oxifft/src/rdft/codelets/mod.rs.

§Usage

use oxifft_codegen::gen_rdft_codelet;

// Generates `pub fn r2hc_4_gen<T: crate::kernel::Float>(x: &[T], y: &mut [Complex<T>])`
gen_rdft_codelet!(size = 4, kind = R2hc);

// Generates `pub fn hc2r_4_gen<T: crate::kernel::Float>(y: &[Complex<T>], x: &mut [T])`
gen_rdft_codelet!(size = 4, kind = Hc2r);

Supported sizes: 2, 4, 8.