Tensorium
Loading...
Searching...
No Matches
tensorium::SpectralFFT< T > Class Template Reference

Fast Fourier Transform (FFT) implementation using Cooley–Tukey algorithm. More...

#include <Spectral.hpp>

Collaboration diagram for tensorium::SpectralFFT< T >:

Public Types

using Tensor2D = tensorium::Tensor<T, 2>
 
using VectorT = tensorium::Vector<T>
 
using C = std::complex<T>
 
using CVectorT = tensorium::Vector<C>
 

Static Public Member Functions

static void forward (CVectorT &a)
 Perform forward FFT (in-place)
 
static void backward (CVectorT &a)
 Perform inverse FFT (in-place)
 

Static Private Member Functions

static void transform_impl (CVectorT &a, bool inverse)
 Internal FFT implementation (shared by forward/backward)
 
static void bit_reverse (CVectorT &a)
 Bit-reversal permutation step.
 

Detailed Description

template<typename T>
class tensorium::SpectralFFT< T >

Fast Fourier Transform (FFT) implementation using Cooley–Tukey algorithm.

Performs in-place FFT or inverse FFT on complex-valued vectors whose size is a power of 2.

Template Parameters
TUnderlying scalar type (e.g., float or double)

Member Typedef Documentation

◆ C

template<typename T >
using tensorium::SpectralFFT< T >::C = std::complex<T>

◆ CVectorT

◆ Tensor2D

template<typename T >
using tensorium::SpectralFFT< T >::Tensor2D = tensorium::Tensor<T, 2>

◆ VectorT

Member Function Documentation

◆ backward()

template<typename T >
static void tensorium::SpectralFFT< T >::backward ( CVectorT & a)
inlinestatic

Perform inverse FFT (in-place)

Parameters
aInput/output complex vector (must have power-of-two size)

References tensorium::SpectralFFT< T >::transform_impl().

Referenced by tensorium::backwardFFP(), and tensorium::backwardFFT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bit_reverse()

template<typename T >
static void tensorium::SpectralFFT< T >::bit_reverse ( CVectorT & a)
inlinestaticprivate

Bit-reversal permutation step.

Parameters
aVector to reorder

References tensorium::Vector< K >::size().

Referenced by tensorium::SpectralFFT< T >::transform_impl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ forward()

template<typename T >
static void tensorium::SpectralFFT< T >::forward ( CVectorT & a)
inlinestatic

Perform forward FFT (in-place)

Parameters
aInput/output complex vector (must have power-of-two size)

References tensorium::SpectralFFT< T >::transform_impl().

Referenced by tensorium::forwardFFT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_impl()

template<typename T >
static void tensorium::SpectralFFT< T >::transform_impl ( CVectorT & a,
bool inverse )
inlinestaticprivate

Internal FFT implementation (shared by forward/backward)

Parameters
aVector to transform
inverseWhether to perform inverse FFT

References tensorium::SpectralFFT< T >::bit_reverse(), pi, and tensorium::Vector< K >::size().

Referenced by tensorium::SpectralFFT< T >::backward(), and tensorium::SpectralFFT< T >::forward().

Here is the call graph for this function:
Here is the caller graph for this function:

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