-
Notifications
You must be signed in to change notification settings - Fork 7
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
Can the dependency of FFTW be replaced by AbstractFFTs? #50
Comments
Good remark. So to effectively use FourierTools, user always need to load a FFT backend. Right? |
Maybe one can ship it with "batteries", i.e. FFTW included but it then uses the FourierToolsCore package where it exports also almost all it's functions? |
Yeah we could but it would be some extra work. So not sure if it's worth it. Are the other mentioned packages in any way competitive with FFTW.jl already? So is it really of practical need? |
FFTW.jl has the drawback of relying on a third party library with a GPL license, and in some specific situations might be a barrier to depend on it. FastTransforms is pure Julia, and RustFFT depends on a library licensed under Apache and MIT. RustFFT.jl also claims to be faster than FFTW.jl (see its README), although it is limited to one-dimensional variables. |
Yes. e.g. |
Yeah, or we would do two packages The latter would pull in FFTW.jl as default. |
Sorry, this statement was wrong: FastTransforms is a wrapper to a C library (MIT licensed). |
Are you sure that FFTW.jl is not free to use in Julia? |
Tdlr; The Julia code of FFTW.jl is MIT but not underlying FFTW code. See https://github.com/JuliaMath/FFTW.jl?tab=readme-ov-file#license |
I was going to prepare a PR to test how this proposed change would look like, and have realized that it is not totally straightforward, because there are a few functions ( |
... and possibly fftshift? Or is that part of the general framework? |
This is covered by AbstractFFTs. |
FFT.jl is a particular implementation of AbstractFFTs.jl, with a few exensions documented in https://juliamath.github.io/FFTW.jl/stable/fft/
But unless I have missed something, FourierTools does not use any of those functions.
So perhaps the dependency from FFTW might be dropped in favor of AbstractFFTs, and let users choose their preferred implementation (FFTW if they want, but also maybe FastTransforms, or RustFFT, for instance).
This might be arguably breaking, since users should install any of those implementations explicitly in order to use this package
(in the fashion of FileIO), although nothing of their code would change. The advantages are that FourierTools would be lighter and more flexible.The text was updated successfully, but these errors were encountered: