-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: rewritten FFTW interface #1856
Conversation
This looks awesome! Very exciting to have this. Thanks. |
This is awesome. Couple of comments. The tests can start passing, once you replace the use of |
Oops - I see you have already fixed the image.jl - I was looking at the commits in wrong order. |
The travis build has passed for both gcc and clang after the last commit, but it is showing yellow on github. Perhaps a travis bug? @staticfloat any ideas? Looks good to merge otherwise. |
Showing green for me! |
Thanks! Probably should wait to merge until I update the documentation. I also noticed a bug in the treatment of subarrays that I should fix, and add a test case for. I should have an updated patch in a couple of days. |
@loladiro It is not showing green here - https://github.com/JuliaLang/julia/pull/1856/commits |
Hmm, interesting seems like a github bug though, since it shows up correctly in the "Discussion" section for me! |
for i in 1:numel(X) | ||
x[i] *= s; | ||
end | ||
end | ||
|
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.
In scale!
there is a typo on line 407. It should be X
instead of x
.
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 am copying these scale!
functions into linalg.jl
for use in norm
, so may be best to remove them from here.
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.
Yes, I noticed that. Also, it should return X.
Added documentation, bugfixes, etcetera. Should hopefully be good to merge. One thing I observed: plan execution seems to have an overhead of 30-50us compared to C, which is very noticeable for transforms of small sizes (especially <= 1000 or so). Deleting the |
RFC: rewritten FFTW interface
This patch rewrites the FFTW interface as discussed in issues #1617, #1806, and #1805.
The
fft(x)
function now performs a multidimensional FFT by default (what used to be calledfftn
). To transform along 0 or more dimensions, dofft(x, region)
where region is an iterable set of integers. (Similarly forbfft
,ifft
,rfft
, etcetera.) The functionsfftn
,fft2
, andfft3
are removed.It also adds a new function
p = plan_fft(x)
which returns a functionp(x)
that computes optimized FFTs of a fixed size.plan_fft
has optional arguments to specify the region and FFTW planner flags.It also adds in-place functions
fft!
etcetera. Subarrays are now supported too.There are a few other odds and ends that I changed. e.g.
FFTW.import_wisdom
andFFTW.export_wisdom
now import/export both single and double precision wisdom from/to a single file. TheFFTW.num_threads
function should now work properly even iffft
has been previously called.brfft
no longer overwrites its input. The 64-bit API is used everywhere. Thefft.jl
tests are a bit more extensive.The documentation has not been updated yet; I wanted to get some feedback first. UPDATE: Documentation added.