Skip to content

Conversation

@wheeheee
Copy link
Contributor

@wheeheee wheeheee commented Feb 8, 2026

For FFTAPlan_re and FFTAPlan_cx, plus a bit of cleanup. Slightly edited test_allocations, which is still a bit wonky because apparently when testing checkbounds=true causes allocations, althought that's technically a Julia problem. Maybe better to remove those tests altogether.
For compat, an extra constructor that takes only the first two params.
sort! also feels somewhat questionable when e.g. 2:-1:1 can be passed as the region argument

@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 93.75000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.22%. Comparing base (f4c4fb8) to head (f6e99e1).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/plan.jl 93.75% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #103      +/-   ##
==========================================
- Coverage   97.21%   96.22%   -0.99%     
==========================================
  Files           4        4              
  Lines         431      424       -7     
==========================================
- Hits          419      408      -11     
- Misses         12       16       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

macro test_allocations(args)
if Base.VERSION >= v"1.9"
:(@allocations($(esc(args))))
@static if Base.VERSION >= v"1.9"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own reference, what's the effect of this change? I know basic macros, and I'm guessing that the point is to ensure the @allocations symbol doesn't appear in code run for Julia <1.9, but I was under the impression that the revised code amounts to the same thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@static causes the if statement to be evaluated only once during macro expansion, so after that the macro would be the code in only one of the branches. I suspected weird "action-at-a-distance" machinery was involved in allocating so I wanted to minimise extraneous code paths.

That was also the motivation for escaping the @allocations macro.
How much this actually works, not clear, but it's not harmful or incorrect and the tests pass with this change.

Copy link
Collaborator

@dannys4 dannys4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dannys4 dannys4 added this pull request to the merge queue Feb 9, 2026
Merged via the queue into JuliaMath:main with commit af2da8e Feb 9, 2026
6 of 8 checks passed
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.

2 participants