|
Oakfield API Documentation 1.0.0
Numerical core APIs
|
Reusable 1D and 2D complex FFT plans for operator implementations. More...


Go to the source code of this file.
Classes | |
| struct | FFTPow2Plan |
| Reusable radix-2 complex FFT plan for power-of-two transform lengths. More... | |
| struct | FFTPlan |
| Reusable 1D complex FFT plan for arbitrary nonzero transform lengths. More... | |
| struct | FFTPlan2D |
| Separable 2D complex FFT plan built from row and column 1D plans. More... | |
Typedefs | |
| typedef struct FFTPow2Plan | FFTPow2Plan |
| Reusable radix-2 complex FFT plan for power-of-two transform lengths. | |
| typedef struct FFTPlan | FFTPlan |
| Reusable 1D complex FFT plan for arbitrary nonzero transform lengths. | |
| typedef struct FFTPlan2D | FFTPlan2D |
| Separable 2D complex FFT plan built from row and column 1D plans. | |
Functions | |
| void | fft_pow2_plan_reset (FFTPow2Plan *plan) |
| Reset a power-of-two FFT plan to an empty non-owning state. | |
| void | fft_pow2_plan_destroy (FFTPow2Plan *plan) |
| Free storage owned by a power-of-two FFT plan and reset it. | |
| SimResult | fft_pow2_plan_init (FFTPow2Plan *plan, size_t n) |
| Initialize a radix-2 FFT plan. | |
| void | fft_pow2_execute (const FFTPow2Plan *plan, double complex *data, bool inverse) |
| Execute an initialized radix-2 complex FFT in place. | |
| void | fft_plan_reset (FFTPlan *plan) |
| Reset a 1D FFT plan to an empty non-owning state. | |
| void | fft_plan_destroy (FFTPlan *plan) |
| Free storage owned by a 1D FFT plan and reset it. | |
| SimResult | fft_plan_init (FFTPlan *plan, size_t n) |
| Initialize a 1D complex FFT plan for any nonzero length. | |
| SimResult | fft_plan_forward (const FFTPlan *plan, const double complex *input, double complex *output) |
| Execute a 1D forward complex FFT. | |
| SimResult | fft_plan_inverse (const FFTPlan *plan, const double complex *input, double complex *output) |
| Execute a normalized 1D inverse complex FFT. | |
| void | fft_plan2d_reset (FFTPlan2D *plan) |
| Reset a 2D FFT plan to an empty non-owning state. | |
| void | fft_plan2d_destroy (FFTPlan2D *plan) |
| Free storage owned by a 2D FFT plan and reset it. | |
| SimResult | fft_plan2d_init (FFTPlan2D *plan, size_t rows, size_t cols, size_t row_stride, size_t col_stride) |
| Initialize a separable 2D complex FFT plan. | |
| SimResult | fft_plan2d_forward (const FFTPlan2D *plan, const double complex *input, double complex *output) |
| Execute a separable 2D forward complex FFT. | |
| SimResult | fft_plan2d_inverse (const FFTPlan2D *plan, const double complex *input, double complex *output) |
| Execute a normalized separable 2D inverse complex FFT. | |
Reusable 1D and 2D complex FFT plans for operator implementations.
Power-of-two sizes use a radix-2 plan, while non-power-of-two 1D sizes use Bluestein convolution over an internal power-of-two plan. The 2D plan applies separable row and column transforms using caller-provided strides.
Reusable 1D complex FFT plan for arbitrary nonzero transform lengths.
Power-of-two lengths use FFTPow2Plan directly; other lengths own the Bluestein chirp/convolution scratch storage needed by fft_plan_forward() and fft_plan_inverse().
Separable 2D complex FFT plan built from row and column 1D plans.
The plan owns its nested row/column plans and temporary row/column scratch buffers until fft_plan2d_destroy() is called.
| typedef struct FFTPow2Plan FFTPow2Plan |
Reusable radix-2 complex FFT plan for power-of-two transform lengths.
An initialized plan owns its bit-reversal table, twiddle storage, and optional vDSP scratch/setup resources until fft_pow2_plan_destroy() is called.
| void fft_plan2d_destroy | ( | FFTPlan2D * | plan | ) |
Free storage owned by a 2D FFT plan and reset it.
| plan | Plan to destroy; NULL is ignored. |
| SimResult fft_plan2d_forward | ( | const FFTPlan2D * | plan, |
| const double complex * | input, | ||
| double complex * | output | ||
| ) |
Execute a separable 2D forward complex FFT.
| plan | Initialized 2D FFT plan. | |
| input | Input buffer addressed by the plan strides. | |
| [out] | output | Output buffer addressed by the plan strides. |
| SimResult fft_plan2d_init | ( | FFTPlan2D * | plan, |
| size_t | rows, | ||
| size_t | cols, | ||
| size_t | row_stride, | ||
| size_t | col_stride | ||
| ) |
Initialize a separable 2D complex FFT plan.
| plan | Plan object to initialize. |
| rows | Number of rows; must be greater than zero. |
| cols | Number of columns; must be greater than zero. |
| row_stride | Element stride between adjacent rows. |
| col_stride | Element stride between adjacent columns. |
| SimResult fft_plan2d_inverse | ( | const FFTPlan2D * | plan, |
| const double complex * | input, | ||
| double complex * | output | ||
| ) |
Execute a normalized separable 2D inverse complex FFT.
| plan | Initialized 2D FFT plan. | |
| input | Input buffer addressed by the plan strides. | |
| [out] | output | Output buffer addressed by the plan strides. |
| void fft_plan2d_reset | ( | FFTPlan2D * | plan | ) |
Reset a 2D FFT plan to an empty non-owning state.
| plan | Plan to reset; NULL is ignored. |
| void fft_plan_destroy | ( | FFTPlan * | plan | ) |
Free storage owned by a 1D FFT plan and reset it.
| plan | Plan to destroy; NULL is ignored. |
| SimResult fft_plan_forward | ( | const FFTPlan * | plan, |
| const double complex * | input, | ||
| double complex * | output | ||
| ) |
Execute a 1D forward complex FFT.
| plan | Initialized 1D FFT plan. | |
| input | Input buffer with plan->n entries. | |
| [out] | output | Output buffer with plan->n entries. |
Initialize a 1D complex FFT plan for any nonzero length.
| plan | Plan object to initialize. |
| n | Transform length; must be greater than zero. |
| SimResult fft_plan_inverse | ( | const FFTPlan * | plan, |
| const double complex * | input, | ||
| double complex * | output | ||
| ) |
Execute a normalized 1D inverse complex FFT.
| plan | Initialized 1D FFT plan. | |
| input | Input buffer with plan->n entries. | |
| [out] | output | Output buffer with plan->n entries. |
| void fft_plan_reset | ( | FFTPlan * | plan | ) |
Reset a 1D FFT plan to an empty non-owning state.
| plan | Plan to reset; NULL is ignored. |
| void fft_pow2_execute | ( | const FFTPow2Plan * | plan, |
| double complex * | data, | ||
| bool | inverse | ||
| ) |
Execute an initialized radix-2 complex FFT in place.
| plan | Initialized power-of-two plan. |
| data | Complex buffer with plan->n entries; transformed in place. |
| inverse | When true, compute the normalized inverse transform. |
| void fft_pow2_plan_destroy | ( | FFTPow2Plan * | plan | ) |
Free storage owned by a power-of-two FFT plan and reset it.
| plan | Plan to destroy; NULL is ignored. |
| SimResult fft_pow2_plan_init | ( | FFTPow2Plan * | plan, |
| size_t | n | ||
| ) |
Initialize a radix-2 FFT plan.
| plan | Plan object to initialize. |
| n | Transform length; must be nonzero and a power of two. |
| void fft_pow2_plan_reset | ( | FFTPow2Plan * | plan | ) |
Reset a power-of-two FFT plan to an empty non-owning state.
| plan | Plan to reset; NULL is ignored. |