AbstractFFTs.jl icon indicating copy to clipboard operation
AbstractFFTs.jl copied to clipboard

Define FFT planning flags independent from FFTW

Open david-macmahon opened this issue 3 years ago • 2 comments

The FFT planning functions, plan_fft et al., accept a keyword argument flags that is used to provide options to the planning function of the FFT implementation. The flags argument is currently documented to be "a bitwise-or of FFTW planner flags". This effectively creates a documented dependency on FFTW, even though FFTW is not a dependency of AbstractFFTs (in fact it's the other way around). It would be preferable to have AbstractFFTs define any and all flags that FFT planners may wish to use and then have FFT implementations, such as FFTW, adapt the flags from AbstractFFTs values to suitable values for use with the underlying implementation as they see fit.

For an example of why the current approach is problematic, see https://github.com/JuliaGPU/CUDA.jl/issues/1559

david-macmahon avatar Jul 09 '22 17:07 david-macmahon

I totally support this and would find it nice since I already created several workarounds in my packages because of that.

roflmaostc avatar Sep 26 '22 12:09 roflmaostc