Registry / other / fftw3
library3.3.10vcpkgunverified

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST).

vcpkg install fftw3
INSTALL
IMPORT
SIG · FFTW3
F
fftw3
othercppv3.3.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fftw3.h
✓ #include <fftw3.h>

Computes a 1D real-to-complex FFT.

#include <fftw3.h> #include <cmath> #include <iostream> int main() { int n = 8; double *in = (double*) fftw_malloc(sizeof(double) * n); fftw_complex *out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * n); fftw_plan p = fftw_plan_dft_r2c_1d(n, in, out, FFTW_ESTIMATE); for (int i = 0; i < n; i++) in[i] = sin(2 * M_PI * i / n); fftw_execute(p); std::cout << "FFT computed." << std::endl; fftw_destroy_plan(p); fftw_free(in); fftw_free(out); return 0; }
Debug
Known issues
gotchaFFTW uses its own memory allocation functions (fftw_malloc) for proper alignment; using standard malloc may cause crashes on SIMD-enabled builds.
fix
Always use fftw_malloc for arrays passed to FFTW plans.
affects: *
Upgrade
Version history
3.3.10latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources

No resource links recorded.

fftw3 — pip install fftw3 · libregistry