Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mixed-radix FFT calculation.
Arbitrary input vector lengths are handled using a mixed-radix Cooley-Tukey decimation in time algorithm with residual prime length vectors being treated using Rader's algorithm or hand-coded codelets for small primes.
- fft :: Vector v (Complex Double) => v (Complex Double) -> IO (v (Complex Double))
- ifft :: Vector v (Complex Double) => v (Complex Double) -> IO (v (Complex Double))
- fftWith :: Vector v (Complex Double) => Plan -> v (Complex Double) -> v (Complex Double)
- ifftWith :: Vector v (Complex Double) => Plan -> v (Complex Double) -> v (Complex Double)
- plan :: Int -> IO Plan
- planFromFactors :: Int -> (Int, Vector Int) -> IO Plan
- execute :: Plan -> Direction -> VCD -> VCD
- data Plan = Plan {}
- data Direction
- data BaseTransform
- = SpecialBase { }
- | DFTBase { }
- | RaderBase {
- baseSize :: Int
- raderOutPerm :: VI
- raderBFwd :: VCD
- raderBInv :: VCD
- raderConvSize :: Int
- raderConvPlan :: Plan
Documentation
fft :: Vector v (Complex Double) => v (Complex Double) -> IO (v (Complex Double)) Source
Forward FFT with embedded plan calculation. For an input vector h of length N, with entries numbered from 0 to N - 1, calculates the entries in H, the discrete Fourier transform of h, as:
ifft :: Vector v (Complex Double) => v (Complex Double) -> IO (v (Complex Double)) Source
Inverse FFT with embedded plan calculation. For an input vector H of length N, with entries numbered from 0 to N - 1, representing Fourier amplitudes of a signal, calculates the entries in h, the inverse discrete Fourier transform of H, as:
fftWith :: Vector v (Complex Double) => Plan -> v (Complex Double) -> v (Complex Double) Source
Forward FFT with pre-computed plan.
ifftWith :: Vector v (Complex Double) => Plan -> v (Complex Double) -> v (Complex Double) Source
Inverse FFT with pre-computed plan.
planFromFactors :: Int -> (Int, Vector Int) -> IO Plan Source
Plan calculation for a given problem factorisation.
A FFT plan. This depends only on the problem size and can be pre-computed and reused to transform (and inverse transform) any number of vectors of the given size.
Plan | |
|
data BaseTransform Source
A "base transform" used at the "bottom" of the recursive Cooley-Tukey decomposition of the input problem size: either a simple DFT, a special hard-coded small problem size case, or a Rader prime-length FFT invocation.
SpecialBase | Hard-coded small-size base transform. |
DFTBase | Simple DFT base transform, giving problem size and powers of roots of unity needed for transform. |
RaderBase | Prime-length Rader FFT base transform, giving problem size, output index permutation (the input index permutation is folded into the main input permutation of the full transform), pre-transformed Rader b sequence for forward and inverse problems, the (padded or not) problem size for Rader sequence convolution and a sub-plan (either of size baseSize-1 or the next larger power of two) for computing the Rader convolution. |
|