[PD-dev] Multithreading support for FFT functions

Pierre Guillot guillotpierre6 at gmail.com
Wed Feb 7 15:58:50 CET 2018


Hi,

As IOhannes pointed it in this Github pull request (
https://github.com/pure-data/pure-data/pull/81), the FFT functions in
d_fft_fftsg.c are not thread-safe. An easy fix would be to set the static
variables TLS (*PERTHREAD*). (It doesn't solve the "size problem" of the
original pull request but it can be complementary). If it seems good for
you, I will add this to the pull request dedicated to the
multi-instance/multithreading problems on Github (
https://github.com/pure-data/pure-data/pull/288).

Another solution would be to integrate these static variables in the pd
instance structure (and to allocate the memory for each instance)?
Nevertheless, this second solution would add some code pretty useless if
someone use the FFTW wrapper. But is anybody using the FFTW wrapper
(d_fft_fftw.c)? If this second solution seems more suitable, I can create a
new pull request.

Cheers,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180207/16db2fc8/attachment.html>


More information about the Pd-dev mailing list