-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
De-macroize FFT #558
De-macroize FFT #558
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is good. Only two suggestions.
- Could you coordinate with @blackwer for PR Provide a user level locking mechanism for FFTW #548 ? So that we do not do the same work twice?
- Can we have a generic fftPlan that with ifdefs for ducc or fftw inside fft.cpp? Since ducc0 plan does nothing fft.plan does nothing for ducc and does the planning for fftw.
FWIW, I probably won't finish that PR until mid next week probably. There's more investigation about the cause of the locking bug that I need to complete, and have other things on my plate right now |
I'm not in a hurry myself, so it's absolutely fine from my side to wait. |
I think having a plan in finufft.cpp and all the ifdefs in fft.cpp is better for readability. So that if someone wants to understand the math in finufft.cpp they can do so without worrying on who and how the fft is done. There's just and fft there. |
Most of the conditional compilation is now gone. The remaining conditional section is where constants from FFTW are used and where the actual |
#548 got merged. Can you update this? Can you also silence the warning about datatypes that appear on github? I was responsible or the mess on the other files but I will try to clean them as they make code reviews tedious. |
I'll try to update the patch tomorrow. If the custom locking function is supposed to supersede our own locking completely, this might get interesting ... |
The way the custom locking mechanism is currently implemented does not work with plan-independent calls like FFTW_FORGET_WISDOM and FFTW_CLEANUP. Do we want to lock these as well? I'm asking because that's what I'm doing at the moment on this branch, but I can't use the custom locking mechanism for it, since I don't have access to |
Since those are internal helper functions for testing and not part of the implementation or the API, I don't think we should mess with locking them at all. Is there a use case to bother? |
I'm happy to remove locking from these entirely! |
I leave the warning to your judgement :) |
I've added a few experiments to work around the warnings ... let's see. |
The warnings about padding inside FINUFFT_PLAN_S can be fixed by changing the order or member variables. Should I do that? |
OK, that's all the warning fixes I could make (without restructuring the plan type). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor changes. Then we can merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor changes. Then we can merge.
Yes, that is a good idea. I might disable that warning entirely at some point since these are not crucial. Unlikely to create an array with thousands of plans. |
I'm not sure I understand. Should I rearrange struct members, or is it better to disable the warning at some point? |
I see, I did not think of that. Let's disable the warning in the future. Readability is better in this case |
OK, should be good now. |
Merging once pipeline finishes. For the future, using |
Thanks, good to know! |
Next step in the de-macroizing effort.