Skip to content

Add radix-4 RFFT kernel and remove duplicate dfft subtree#76

Merged
falseywinchnet merged 1 commit into
mainfrom
25y1qg-main/delete-dfft-folder-and-convert-code-to-kernel
Jun 29, 2026
Merged

Add radix-4 RFFT kernel and remove duplicate dfft subtree#76
falseywinchnet merged 1 commit into
mainfrom
25y1qg-main/delete-dfft-folder-and-convert-code-to-kernel

Conversation

@falseywinchnet

Copy link
Copy Markdown
Owner

Motivation

  • Remove a duplicated dfft/ workspace from the repository to keep the tree focused and small.
  • Convert the provided standalone radix-4 RFFT prototype into a reusable internal kernel that fits the project's SIMD abstraction and heap-backed planning model.
  • Provide both scalar and two-lane SIMD entry points so the kernel can be exercised as a drop-in internal primitive and iterated for backend-specific optimizations.

Description

  • Deleted the large dfft/ duplicate subtree and added src/detail/radix4_rfft_kernel.hpp implementing a bruun::radix4_rfft_kernel class that owns planning tables (bit-reversal, cos/sin, staged twiddles) and exposes forward_scalar and forward_simd entry points.
  • Implemented the radix-4 algorithm pieces from the prototype: bit-reverse input packing, fused first binomial, merge2 and merge4_inplace passes, scalar and SIMD butterfly code paths, and final packing to real/imag output bins.
  • Integrated with the shared Bruun SIMD primitives and heap_array allocator so the kernel selects the existing two-lane SIMD backend where available and falls back to scalar code otherwise.

Testing

  • Built and ran a small smoke driver that exercises radix4_rfft_kernel::forward_scalar with N=64 and validates output against a direct DFT, which completed successfully.
  • Ran the project test target (make test), which executed the suite and reported correctness on the build host; the test run succeeded.
  • Also compiled and ran a quick SIMD smoke compile for the new kernel and observed expected numeric results for multiple sizes during validation.

Codex Task

@falseywinchnet falseywinchnet merged commit 40e47ed into main Jun 29, 2026
4 checks passed
@falseywinchnet falseywinchnet deleted the 25y1qg-main/delete-dfft-folder-and-convert-code-to-kernel branch July 2, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant