| Tristram Scott 2007-02-28, 7:14 pm |
| Nilanjan Dasgupta <nilanjan@gmail.com> wrote:
> Hi,
> Did anybody write a FFT routine in mex format that can be
> compiled by matlab and called as a routine? I would like to compare
> the speed of this w.r.t Matlab fft calls.
>
> thanks
> Neel
I wrote a few mex wrappers for FFT calls some years back, before MATLAB
began using fftw. One was for the fft routines that shipped on the SGI
Irix platform in their Scientific Computing Software Library (SCSL)
libraries. Another was a call to fftw. The comparisons I did showed
mixed results, with SCSL and fftw both doing better than MATLAB back then,
especially on large arrays. Sometimes the fftw did better than the SCSL
libraries, but not always.
Shortly after that, MATLAB adopted fftw.
You may be able to get some improvements on a multiprocessor system if
MATLAB's call to fftw is not already utilising multiple processors when
called with 2D ffts. There are also tuning options to fftw, which I think
MATLAB may let you play with these days. If not, that would be another
spot where you could speed things up.
--
Dr Tristram J. Scott
Energy Consultant
|