• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language SourcePawn
  • Created about 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of Fast Fourier Transform algorithms implemented in C++20.

Fast Fourier Transform - implementation in C++

It’s a collection of Fast Fourier Transform algorithms, featured in Joel Yliluoma’s master’s thesis (“pro gradu”) in University of Helsinki.

Algorithms

Supported algorithms:

  • Discrete Fourier Transform (naive DFT)
  • Cooley-Tukey FFT (radix-2)
  • Cooley-Tukey FFT (generic)
  • Rader’s FFT
  • Bluestein’s FFT
  • Combined (heuristic) algorithm
  • FFTW (for reference)

Structure

  • defs.hh: Definitions for complex types and complex vectors.
  • exp.hh and exp.cc: A module for handling exp-vectors containing $e^{-i2\pi x/N}$ values.
  • factor.hh and factor.cc: A module for integer factorization utilities.
  • dft.hh and dft.cc: The naive DFT. Also works as a fallback for any algorithm. Contains optimized FFTs for sizes ≤ 4.
  • fft_fftw.hh and fft_fftw.cc: FFT through libFFTW3.
  • fft_radix2.hh and fft_radix2.cc: Fast FFT for powers-of-two lengths (Cooley-Tukey radix-2).
  • fft_tukey.hh and fft_tukey.cc: Generic Cooley-Tukey algorithm. Requires that the input length is a composite number.
  • fft_rader.hh and fft_rader.cc: Rader’s FFT. Requires that the input length is a prime number. Performs sub-FFTs using FFT_any for length $N-1$.
  • fft_bluestein.hh and fft_bluestein.cc: Bluestein’s FFT. Performs sub-FFTs using FFT_any for length $m$. Provided are three versions:
    • FFT_bluestein selects smallest convolution length $m ≥ 2N-1$ such that $m$ consists of only these factors: 2, 3, 5 or 7.
    • FFT_bluestein_pow2 selects smallest convolution length $m ≥ 2N-1$ such that $m$ consists of only these factors: 2.
    • FFT_bluestein_fac2_3 selects smallest convolution length $m ≥ 2N-1$ such that $m$ consists of only these factors: 2 or 3.
  • fft_any.hh and fft_any.cc: Combined FFT. Uses heuristics to decide the fastest method for any input size (excluding FFTW).

Also

  • render.cc: See below
  • planner.cc: A tool for generating FFTW wisdom files

Graph rendering tool

The program render.cc is used to render speed comparison graphs for the thesis. This tool was created because LibreOffice Calc was too sluggish to operate with CSV files containing tens of thousands of rows and multiple columns.

Speech recognition test

The program main.cc in the speech/ branch is used for analyzing vowel formants in speech by FFT.

More Repositories

1

compiler_series

Material for the Creating a Compiler video lesson series.
Yacc
532
star
2

that_editor

*That* editor.
C++
361
star
3

that_terminal

It’s that terminal! This project was mostly created (or started) in a livestream series.
NASL
277
star
4

cpp_parallelization_examples

The study & production material for https://www.youtube.com/watch?v=Pc8DfEyAxzg
C++
173
star
5

TinyDeflate

A deflate/gzip decompressor that requires minimal amount of memory to work
C++
170
star
6

speech_synth_series

Let’s Create a Speech Synthesizer
PHP
104
star
7

password_codecs

Collection of password encoders and decoders created with the video series at: https://www.youtube.com/playlist?list=PLzLzYGEbdY5nEFQsxzFanSDv_38Hz0w7B
C++
84
star
8

adlmidi

ADLMIDI is a MIDI player that uses OPL3 emulation.
C++
59
star
9

crt-filter

The CRT filter that I used in my "what is that editor" video
C++
52
star
10

tinyprintf

printf replacement for embedded programming
C++
51
star
11

nescom

NES assembler and particularly clever disassembler
C++
43
star
12

dirr

ls replacement, friendlier than ls
C++
31
star
13

lvm2defrag

PHP
25
star
14

animmerger

Animation merging, quantizing and dithering swiss army knife
C++
18
star
15

nandcombinator

Exhaustive 2-input NAND combinations research tool
C++
17
star
16

viewnes

NES graphics/data hex inspection tool
PHP
13
star
17

tokumaru

Codemasters/Tokumaru NES tile compressor+decompressor
C++
5
star
18

6502delay

Collection of 6502 delay code generators
4
star
19

hy-ohte

Helsingin yliopisto: OHTE Harjoitustyö
3
star
20

cysex21

This is just a mandatory exercise for the Cybersecurity course in University of Helsinki. It is not meant to be useful for any practical purpose.
PHP
3
star
21

polytrain

JavaScript
2
star