Add FFTW rectangular/polar round-trip benchmark with dynamic loading and SFDR metrics#70
Merged
falseywinchnet merged 1 commit intoJun 27, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
MEASURE) while keeping the build independent of FFTW headers or link-time libraries by using dynamicdlopen/dlsymresolution.Description
examples/fftw_polar_roundtrip_benchmark.cppimplementing deterministic multi-frame input generation, BFFT and FFTW double/float paths, polar conversion usingatan2/sin/cos, and separate timing for forward/inverse/combined loops.dlopen/dlsym, resolvingfftw_plan_dft_r2c_1d,fftw_plan_dft_c2r_1d,fftw_execute,fftw_destroy_plan,fftw_malloc,fftw_freeand their float (fftwf_) variants, plus optional metadatafftw_version,fftw_cc,fftw_codelet_optim(printsn/awhen missing and reports NEON presence via string search).FFTW_MEASURE_FLAG,FFTW_ESTIMATE_FLAG,FFTW_PATIENT_FLAG, etc.) with CLI options--fftw-measure(default),--fftw-estimate, and--fftw-patient, and CLI flags--sfdr/--no-sfdrand--help.fftw_polar_roundtrip_benchmarkand configured it to output intobuild/examplesand linkdlwhen available so the project builds without FFTW present.Testing
cmake -S . -B buildandcmake --build build -jcompleted successfully.ctest --test-dir build --output-on-failureand all tests passed../build/examples/fftw_polar_roundtrip_benchmark 64 4 --no-sfdrand./build/examples/fftw_polar_roundtrip_benchmark 64 4 --sfdr, both ran and produced the expected benchmark and SFDR output (FFTW rows are gracefully skipped when libraries are not found).Codex Task