DSPRelated.com
Forums

Multi-threaded FFTW

Started by Cristiano August 14, 2007
I'm using the FFTW library implemented as DLL under Win XP.
Now I'm writing (in C++) a multi-threaded application which call the FFTW
functions from two function in my code at the same time and, obviously, the
application crashes.

Is there any way to use the FFTW library in a multi-threaded application?

Thanks
Cristiano



On Aug 14, 3:37 am, "Cristiano" <cristiano...@NSquipo.it> wrote:
> I'm using the FFTW library implemented as DLL under Win XP. > Now I'm writing (in C++) a multi-threaded application which call the FFTW > functions from two function in my code at the same time and, obviously, the > application crashes. > > Is there any way to use the FFTW library in a multi-threaded application? > > Thanks > Cristiano
I'm not sure if your problem is a result of creating race conditions between your threads, or something inherent about the FFTW library. It sounds like a threading issue though.
Cristiano schrieb:
> I'm using the FFTW library implemented as DLL under Win XP. > Now I'm writing (in C++) a multi-threaded application which call the FFTW > functions from two function in my code at the same time and, obviously, the > application crashes. > > Is there any way to use the FFTW library in a multi-threaded application?
Googleing for "fftw thread safety" yields: You can use FFTW in multithreaded apps, but only the method "fftw_execute" is thread safe. So all FFTW functions calls except fftw_execute have to be serialized (not executed in parallel). Hendrik vdH
Hendrik van der Heijden wrote:
> Googleing for "fftw thread safety" yields: > > You can use FFTW in multithreaded apps, but only the method > "fftw_execute" is thread safe. So all FFTW functions calls except > fftw_execute have to be serialized (not executed in parallel).
You're right! Now my app works. Thank you very much Cristiano