numerics
Loading...
Searching...
No Matches
num::spectral::FFTPlan Class Reference

Precomputed plan for repeated complex transforms of a fixed size. More...

#include <fft.hpp>

Public Member Functions

 FFTPlan (int n, bool forward=true, FFTBackend b=default_fft_backend)
 
 ~FFTPlan ()
 
 FFTPlan (const FFTPlan &)=delete
 
FFTPlanoperator= (const FFTPlan &)=delete
 
void execute (const CVector &in, CVector &out) const
 
int size () const
 
FFTBackend backend () const
 

Detailed Description

Precomputed plan for repeated complex transforms of a fixed size.

num::spectral::FFTPlan plan(1024); // forward, default backend
for (auto& frame : frames)
plan.execute(frame, spectrum); // O(n log n), no allocation
Precomputed plan for repeated complex transforms of a fixed size.
Definition fft.hpp:102
void execute(const CVector &in, CVector &out) const
Definition fft.cpp:124
constexpr T ipow(T x) noexcept
Compute x^N at compile time via repeated squaring.

Definition at line 102 of file fft.hpp.

Constructor & Destructor Documentation

◆ FFTPlan() [1/2]

num::spectral::FFTPlan::FFTPlan ( int  n,
bool  forward = true,
FFTBackend  b = default_fft_backend 
)
explicit
Parameters
nTransform size (must be power of two for FFTBackend::seq)
forwardtrue = forward DFT, false = inverse DFT
bBackend to use (default: default_fft_backend)

Definition at line 80 of file fft.cpp.

References num::spectral::fftw, num::ipow(), num::spectral::simd, and num::spectral::stdsimd.

◆ ~FFTPlan()

num::spectral::FFTPlan::~FFTPlan ( )

Definition at line 102 of file fft.cpp.

References num::spectral::fftw, num::spectral::simd, and num::spectral::stdsimd.

◆ FFTPlan() [2/2]

num::spectral::FFTPlan::FFTPlan ( const FFTPlan )
delete

Member Function Documentation

◆ backend()

FFTBackend num::spectral::FFTPlan::backend ( ) const
inline

Definition at line 117 of file fft.hpp.

◆ execute()

void num::spectral::FFTPlan::execute ( const CVector in,
CVector out 
) const

Definition at line 124 of file fft.cpp.

References execute(), num::spectral::fftw, num::ipow(), num::spectral::simd, and num::spectral::stdsimd.

Referenced by execute().

◆ operator=()

FFTPlan & num::spectral::FFTPlan::operator= ( const FFTPlan )
delete

◆ size()

int num::spectral::FFTPlan::size ( ) const
inline

Definition at line 116 of file fft.hpp.


The documentation for this class was generated from the following files: