Skip to main content

Crate aocl_fft

Crate aocl_fft 

Source
Expand description

Safe wrappers for AOCL-FFTW.

Provides:

  • One-shot 1-D / 2-D / 3-D complex DFTs (in-place) in both f64 (default names) and f32 (suffixed _f32).
  • One-shot 1-D real-to-complex (r2c) and complex-to-real (c2r) transforms in both precisions.
  • Reusable plan types: Plan (f64) and PlanF32 (f32) that cache plan creation and support FFTW’s “new-array execute” routines for repeated transforms over the same shape.

Plan creation/destruction is serialized through a process-wide mutex because FFTW’s planner is not internally thread-safe in the single-threaded build we link against. Plan execution is thread-safe and not held under that lock. The same lock guards both precisions since they share the planner state.

Structs§

Plan
A reusable FFTW plan over a fixed shape and transform kind.
PlanF32
A reusable single-precision FFTW plan over a fixed shape.

Enums§

Direction
Direction of a complex DFT.
Error
Errors that can be returned by safe AOCL wrappers.

Functions§

backward_inplace
Convenience: backward (unscaled) 1-D DFT in place.
backward_inplace_f32
Convenience: backward (unscaled) 1-D f32 DFT in place.
c2r_1d
Compute a 1-D complex-to-real (backward) DFT.
c2r_1d_f32
Compute a 1-D complex-to-real (backward) f32 DFT.
dft_1d_inplace
Compute a 1-D complex DFT in place. data is treated as n = data.len() complex samples in [real, imag] order.
dft_1d_inplace_f32
Compute a 1-D complex DFT in place over f32 samples.
dft_2d_inplace
Compute a 2-D complex DFT in place. data is n0 × n1 complex samples in row-major order (length n0 · n1).
dft_2d_inplace_f32
Compute a 2-D complex DFT in place over f32 samples (row-major).
dft_3d_inplace
Compute a 3-D complex DFT in place.
dft_3d_inplace_f32
Compute a 3-D complex DFT in place over f32 samples.
forward_inplace
Convenience: forward 1-D DFT in place.
forward_inplace_f32
Convenience: forward 1-D f32 DFT in place.
r2c_1d
Compute a 1-D real-to-complex (forward) DFT.
r2c_1d_f32
Compute a 1-D real-to-complex (forward) f32 DFT.

Type Aliases§

Result
Crate result alias — used by every aocl-* safe wrapper crate.