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 forward_3D (Tensor< std::complex< T >, 3 > &a)
static void backward (CVectorT &a)
 Perform inverse FFT (in-place).
static void backward_3D (Tensor< std::complex< T >, 3 > &a)

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

template<typename T>
using tensorium::SpectralFFT< T >::CVectorT = tensorium::Vector<C>

◆ Tensor2D

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

◆ VectorT

template<typename T>
using tensorium::SpectralFFT< T >::VectorT = tensorium::Vector<T>

Member Function Documentation

◆ backward()

template<typename T>
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 transform_impl().

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

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

◆ backward_3D()

template<typename T>
void tensorium::SpectralFFT< T >::backward_3D ( Tensor< std::complex< T >, 3 > & a)
inlinestatic

References backward().

Here is the call graph for this function:

◆ bit_reverse()

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

Bit-reversal permutation step.

Parameters
aVector to reorder

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

Referenced by transform_impl().

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

◆ forward()

template<typename T>
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 transform_impl().

Referenced by forward_3D(), and tensorium::forwardFFT().

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

◆ forward_3D()

template<typename T>
void tensorium::SpectralFFT< T >::forward_3D ( Tensor< std::complex< T >, 3 > & a)
inlinestatic

References forward().

Here is the call graph for this function:

◆ transform_impl()

template<typename T>
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 bit_reverse(), and tensorium::Vector< K >::size().

Referenced by backward(), and 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: