Core concepts¶
Plans¶
A plan owns reusable transform metadata. Create one plan for a given transform size and reuse it for repeated transforms.
BFFT real FFT plans accept power-of-two sizes N >= 4 and use the native
Bruun fast path. BODFT plans
require a power-of-two size N >= 2.
Buffer ownership¶
The C API uses caller-owned buffers. Query the plan for every buffer size:
Function |
Meaning |
|---|---|
|
Transform length |
|
Standard real-to-complex bin count, |
|
Double-precision work buffer length. |
|
Single-precision work buffer length. |
|
Scratch complex values for standard output. |
|
Residue-domain filter length. |
The C++ wrapper provides the same values as methods on bfft::plan.
Layouts¶
BFFT exposes three spectrum layouts.
Standard layout¶
Standard layout is ordinary FFT-order real-to-complex output. It has N / 2 + 1
complex bins and is the right default for most applications.
Native layout¶
Native layout is the internal BFFT order. Use it when performance matters and when downstream code can consume native order directly.
Residue layout¶
Residue layout is used by residue-domain transforms and filtering. It is useful for pipelines that can avoid conversion back to standard complex spectrum form.
Threading and reentrancy¶
Plans are reusable metadata. Transform calls use caller-provided buffers. For concurrent transforms, give each thread its own work buffers and workspace.