xtensor-stack / xtensor-fftw

FFTW bindings for the xtensor C++14 multi-dimensional array library
BSD 3-Clause "New" or "Revised" License
48 stars 16 forks source link

Broadcasting of FFT #4

Open yoshipon opened 7 years ago

yoshipon commented 7 years ago

Thank you for developing xtensor-fftw. I would like to request the following extension that will be improve its usability.

It will be better if there is a broadcasting in xtensor-fftw. I'm studying on multi-channel acoustic signal processing, and often have to conduct FFTs to microphones. In numpy, we can broadcast FFT like this way

np.fft.rfft(np.ndarray([M, T]), axis=1).shape

In my case M and T indicates the number of microphones and time frames. This will be simplify codes of such signal processings.

Best,

egpbos commented 7 years ago

It might be possible to implement this very efficiently using the multiple FFT functionality of FFTW.

yoshipon commented 7 years ago

Thank you for the reply. That's a good idea to use fftw_plan_many_*.

spectre-ns commented 2 years ago

This would be great!

bigpo commented 2 years ago

could xtensor-fftw offer a wrapper for fftw_plan_many_*? @egpbos

egpbos commented 2 years ago

Definitely @bigpo. If you have time to make a PR for it, I'd be happy to help you get that merged. Let me know if you need anything.