Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
fft.H File Reference

Fast Fourier Transform (FFT) and Digital Signal Processing (DSP) toolkit. More...

#include <algorithm>
#include <cmath>
#include <complex>
#include <concepts>
#include <cstdlib>
#include <iterator>
#include <limits>
#include <memory>
#include <numeric>
#include <numbers>
#include <string_view>
#include <type_traits>
#include <ah-errors.H>
#include <thread_pool.H>
#include <tpl_array.H>
Include dependency graph for fft.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Aleph::FFT< Real >
 Fast Fourier Transform (FFT) and DSP Toolkit. More...
 
struct  Aleph::FFT< Real >::IIRCoefficients
 Coefficients for an Infinite Impulse Response (IIR) filter. More...
 
struct  Aleph::FFT< Real >::BiquadSection
 A stable Second-Order Section (SOS) building block. More...
 
struct  Aleph::FFT< Real >::FrequencyResponse
 Discrete frequency response sampled on a fixed angular grid. More...
 
struct  Aleph::FFT< Real >::PhaseMarginInfo
 Phase-margin estimate around a gain crossover. More...
 
struct  Aleph::FFT< Real >::GainMarginInfo
 Gain-margin estimate around a phase crossover. More...
 
struct  Aleph::FFT< Real >::PoleZeroPair
 Greedy nearest-neighbor pole/zero pairing entry. More...
 
struct  Aleph::FFT< Real >::STFTOptions
 Options for STFT analysis. More...
 
struct  Aleph::FFT< Real >::ISTFTOptions
 Options for ISTFT reconstruction. More...
 
struct  Aleph::FFT< Real >::WelchOptions
 Options for Welch PSD, CSD, and coherence estimation. More...
 
struct  Aleph::FFT< Real >::PowerSpectralDensity
 One-sided power spectral density estimate sampled in Hertz. More...
 
struct  Aleph::FFT< Real >::CrossSpectralDensity
 One-sided cross-spectral density estimate sampled in Hertz. More...
 
struct  Aleph::FFT< Real >::CoherenceEstimate
 Magnitude-squared coherence sampled in Hertz. More...
 
struct  Aleph::FFT< Real >::ResamplePolyOptions
 Options for default polyphase resampling filter design. More...
 
struct  Aleph::FFT< Real >::TensorLayout
 Layout descriptor for a flat tensor buffer. More...
 
struct  Aleph::FFT< Real >::Is_Std_Complex< T >
 
struct  Aleph::FFT< Real >::Is_Std_Complex< std::complex< T > >
 
struct  Aleph::FFT< Real >::BalancedPolynomial
 
struct  Aleph::FFT< Real >::SeriesEvaluation
 
struct  Aleph::FFT< Real >::PolynomialEvaluation
 
struct  Aleph::FFT< Real >::TransferTerms
 Internal storage for complex transfer function evaluation terms. More...
 
struct  Aleph::FFT< Real >::RootGroup
 Rationale: Group of one or more roots (typically a conjugate pair) sharing a common geometric center. More...
 
struct  Aleph::FFT< Real >::AnalogPrototype
 Parameters for an analog filter prototype (S-domain). More...
 
struct  Aleph::FFT< Real >::JacobiValues
 Value triplet for Jacobi elliptic functions (sn, cn, dn). More...
 
struct  Aleph::FFT< Real >::WeightedFrequencyGrid
 Frequency-domain grid with target values and importance weights. More...
 
class  Aleph::FFT< Real >::Plan
 Precomputed FFT plan for repeated transforms of the same size. More...
 
class  Aleph::FFT< Real >::STFTProcessor
 Stateful STFT processor for chunked real-time analysis. More...
 
class  Aleph::FFT< Real >::ISTFTProcessor
 Stateful ISTFT processor for chunked frame-by-frame synthesis. More...
 
class  Aleph::FFT< Real >::BatchedSTFTProcessor
 Stateful multichannel STFT processor with one analyzer per channel. More...
 
class  Aleph::FFT< Real >::BatchedISTFTProcessor
 Stateful multichannel ISTFT processor with one synthesizer per channel. More...
 
class  Aleph::FFT< Real >::LFilter
 Stateful direct-form II transposed IIR filter. More...
 
class  Aleph::FFT< Real >::SOSFilter
 Stateful cascade of second-order sections. More...
 
class  Aleph::FFT< Real >::LFilterBank
 Stateful bank of direct-form II transposed IIR filters. More...
 
class  Aleph::FFT< Real >::SOSFilterBank
 Stateful bank of SOS cascades, one per channel. More...
 
class  Aleph::FFT< Real >::OverlapAdd
 Reusable overlap-add convolver for long real sequences. More...
 
class  Aleph::FFT< Real >::OverlapAddBank
 Multichannel overlap-add convolver with one shared kernel FFT. More...
 
class  Aleph::FFT< Real >::OverlapSave
 Reusable overlap-save convolver for streaming real FIR filtering. More...
 
class  Aleph::FFT< Real >::PartitionedConvolver
 Uniform partitioned FIR convolver for low-latency streaming. More...
 

Namespaces

namespace  Aleph
 Main namespace for Aleph-w library functions.
 

Macros

#define ALEPH_FFT_HAS_X86_AVX2_DISPATCH   0
 
#define ALEPH_FFT_HAS_ARM_NEON_DISPATCH   0
 
#define ALEPH_FFT_HAS_ARM_NEON_DOUBLE   0
 

Detailed Description

Fast Fourier Transform (FFT) and Digital Signal Processing (DSP) toolkit.

This header provides a robust, high-performance toolkit for frequency-domain computations. It is designed to handle both power-of-two sizes (via an optimized mixed radix-2/4 Cooley-Tukey kernel) and arbitrary sizes (via Bluestein's algorithm).

Features at a Glance:

  • Spectral Analysis: Forward and inverse FFTs for complex and real signals.
  • Planning: Precompute and cache twiddle factors and bit-reversal tables using Aleph::FFT::Plan for repeated transforms.
  • Filtering: FIR and IIR filters, second-order sections (SOS), and zero-phase filtering (filtfilt).
  • Analysis: Welch PSD estimation, spectrograms (STFT), frequency response (freqz), and group delay.
  • Acceleration: SIMD vectorization (AVX2/NEON) and multi-core parallelism.

Mathematical Foundations:

  • Cooley-Tukey: Efficient O(N log N) recursive decomposition for N=2^k.
  • Bluestein's Algorithm: Converts a DFT of any size N into a linear convolution, which is then computed using power-of-two FFTs.
  • Mixed Radix: Optimized kernels for small primes (2, 3, 5).

Definition in file fft.H.

Macro Definition Documentation

◆ ALEPH_FFT_HAS_ARM_NEON_DISPATCH

#define ALEPH_FFT_HAS_ARM_NEON_DISPATCH   0

Definition at line 96 of file fft.H.

◆ ALEPH_FFT_HAS_ARM_NEON_DOUBLE

#define ALEPH_FFT_HAS_ARM_NEON_DOUBLE   0

Definition at line 102 of file fft.H.

◆ ALEPH_FFT_HAS_X86_AVX2_DISPATCH

#define ALEPH_FFT_HAS_X86_AVX2_DISPATCH   0

Definition at line 83 of file fft.H.