For Programmers: Free Programming Magazines  


Home > Archive > Matlab > February 2007 > Writing fft/fftw routine in mex









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Writing fft/fftw routine in mex
Nilanjan Dasgupta

2007-02-28, 7:14 pm

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
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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com