Skip to content

Straight-line codelets for the 5-, 7-, 11- and 13-point leaves - #4

Open
pankgeorg wants to merge 2 commits into
integration/allfrom
exp/odd-codelets
Open

Straight-line codelets for the 5-, 7-, 11- and 13-point leaves#4
pankgeorg wants to merge 2 commits into
integration/allfrom
exp/odd-codelets

Conversation

@pankgeorg

@pankgeorg pankgeorg commented Aug 30, 2026

Copy link
Copy Markdown
Member

src/odd_codelets.jl: @generated symmetric odd-length DFTs (cosine/sine sums over x_j ± x_{N-j}, folded constants, explicit fma) replace the O(N²) twiddle-table loop for the DFT leaves 5/7/11/13 (Float32/Float64, real input accepted); other sizes and types keep fft_dft!.
compare3 vs integration/all, aarch64, 1 thread, 505 cases: 1.08× geomean; smooth class 1.33× ComplexF64 / 1.61× ComplexF32 / 1.27–1.51× rfft (n=1000 35→20 µs, 46305 3.3→2.0 ms, 10^6 100→66 ms), 5–13-point primes up to 5×; everything without factors 5–13 unchanged (the sub-0.95× cells of the first run were noise: a quiet back-to-back re-run of the N-d/batched cases, benchmark/compare3/aarch64/recheck-nd-batched/, has ≤2 of 117 cells below 0.95×, min 0.93×). Table: benchmark/compare3/aarch64/odd/COMPARE3.md on bench/compare3.
Tested: full suite green on 4 threads (muladd → explicit fma needed for the exact-equality batched-vs-mapslices tests).
x86-64 (companion session, benchmark/x86-64/compare3/odd/): 1.08× geomean; smooth 1.46× ComplexF64 / 1.79× ComplexF32.

Symmetric odd-length DFT (cosine and sine sums over x_j ± x_{N-j}) with
folded constants, (N-1)^2 real multiplications instead of 4(N-1)^2 from a
twiddle table. Real input is accepted. Composite sizes with factors 5/7:
1000 35 -> 19 us, 46305 3.3 -> 1.9 ms, 10^6 100 -> 68 ms (ComplexF64).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant