Skip to content
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

Implement high performance interface #7

Open
egpbos opened this issue Oct 3, 2017 · 3 comments
Open

Implement high performance interface #7

egpbos opened this issue Oct 3, 2017 · 3 comments

Comments

@egpbos
Copy link
Member

egpbos commented Oct 3, 2017

The simple numpy-style interface (#6) will by default hide some of FFTW's features, opting for simplicity and default settings for decent performance. We will also implement a high performance interface to access functions like

  • Choosing FFTW_MEASURE, FFTW_PATIENT, or FFTW_EXHAUSTIVE planner flags (instead of the default FFTW_ESTIMATE);
  • Reusing plans and wisdom;
  • Using fftw_malloc to guarantee optimal memory alignment;
  • FFTW_PRESERVE_INPUT vs FFTW_DESTROY_INPUT, the latter can sometimes be faster.
@egpbos
Copy link
Member Author

egpbos commented Oct 3, 2017

When implementing this, keep in mind that many FFTW functions destroy input and/or output arrays! E.g. FFTW_MEASURE destroys both during measurement, c2r functions always destroy input by default (unless for 1D transforms if you pass FFTW_PRESERVE_INPUT), etc. More info: http://www.fftw.org/fftw3_doc/Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs

@ghost
Copy link

ghost commented Nov 2, 2018

do you plan to implement multi-threaded FFTW in the future?

@egpbos
Copy link
Member Author

egpbos commented Nov 5, 2018

@CUBER12 yes, in time, for sure. I'm using multithreaded FFTW in barcode. My plan is to migrate that code to xtensor and use xtensor-fftw for FFTW. At that point, I will have to optimize xtensor-fftw. However, in the mean time, if you already need it now, please feel free to make a PR for it. FFTW is not difficult to use in multithreaded mode. I just didn't think about how to integrate that into xtensor-fftw nicely. If you have ideas on that, I'd also love to hear them. Preferably start a separate issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant