Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. pocketfft

pocketfft

BSD-3-ClauseC++

A C++11 header-only FFT library with support for multidimensional arrays, DCT/DST, and optimized performance for large prime factors.

GitHubGitHub
147 stars43 forks0 contributors

What is pocketfft?

PocketFFT is a header-only Fast Fourier Transform library for C++11 that provides high-performance, multidimensional FFT, DCT, and DST implementations. It solves the need for a modern, accurate, and flexible FFT library in C++ projects, especially those dealing with scientific computing or signal processing where transform sizes may include large prime factors.

Target Audience

C++ developers working on scientific computing, signal processing, audio analysis, or numerical simulation projects that require efficient Fourier transforms, including support for multidimensional data and various transform types.

Value Proposition

Developers choose PocketFFT for its strict C++11 compliance, excellent numerical accuracy, support for challenging transform sizes via Bluestein's algorithm, and its flexible, header-only design that avoids external dependencies while offering a comprehensive feature set.

Overview

Fork of https://gitlab.mpcdf.mpg.de/mtr/pocketfft to simplify external contributions

Use Cases

Best For

  • Performing multidimensional FFTs on scientific data arrays
  • Implementing audio or signal processing pipelines in C++
  • Computing discrete cosine transforms (DCT) for image compression algorithms
  • Handling FFTs with transform sizes containing large prime factors
  • Integrating a header-only FFT library into C++11 or later projects
  • Real-to-complex and complex-to-real transforms with flexible data layouts

Not Ideal For

  • Applications needing a high-level, simplified FFT API with automatic memory and plan management
  • Real-time signal processing systems where plan creation latency must be minimized and caching is insufficient
  • Projects constrained to C++ standards older than C++11 or with strict code size limitations
  • Developers who prefer extensive documentation, tutorials, and community support over raw performance

Pros & Cons

Pros

Numerical Accuracy Focus

Implements advanced techniques like angle reduction to [0; pi/4] and symmetric evaluations to minimize trigonometric errors, ensuring high precision in transforms as detailed in the README.

Multidimensional Flexibility

Supports transforms on arbitrary axes within N-dimensional arrays with optional multi-threading, making it ideal for scientific data processing where selective axis transformation is needed.

Wide Transform Support

Includes complex FFTs, real FFTs with multiple conventions, DCT, DST types I-IV, and Hartley transforms, covering a comprehensive range of use cases beyond basic FFTs.

Header-Only Integration

As a strictly C++11 compliant header-only library, it's easy to integrate into projects without external dependencies or complex build systems, simplifying deployment.

Cons

Low-Level API Complexity

Requires manual management of strides, shapes, and axes in bytes, which can be error-prone and less intuitive compared to libraries with higher-level abstractions or automatic memory handling.

Limited 1D Threading

Multi-threading is only supported for multidimensional transforms and disabled for 1D transforms, as noted in the README, potentially limiting performance scalability in single-axis applications.

Default Caching Disabled

Plan caching is turned off by default (POCKETFFT_CACHE_SIZE undefined) to save memory, meaning repeated 1D transforms may incur plan creation overhead unless explicitly configured, impacting performance.

Sparse Documentation

The README is technically dense with minimal examples or tutorials, assuming prior FFT knowledge, which can make onboarding difficult for developers new to Fourier transforms.

Frequently Asked Questions

Quick Stats

Stars147
Forks43
Contributors0
Open Issues7
Last commit1 month ago
CreatedSince 2021

Tags

#scientific-computing#fft#signal-processing#c-plus-plus#header-only-library#numerical-computing

Built With

C
C++11

Included in

C/C++70.6k
Auto-fetched 20 hours ago

Related Projects

DSPFiltersDSPFilters

A Collection of Useful C++ Classes for Digital Signal Processing

Stars2,058
Forks405
Last commit2 years ago
kissfftkissfft

a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid

Stars1,929
Forks360
Last commit28 days ago
iir1iir1

DSP IIR realtime filter library written in C++

Stars766
Forks158
Last commit11 months ago
wavelibwavelib

C Implementation of 1D and 2D Wavelet Transforms (DWT,SWT and MODWT) along with 1D Wavelet packet Transform and 1D Continuous Wavelet Transform.

Stars436
Forks137
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub