Steve on Image Processing with MATLAB

Image processing concepts, algorithms, and MATLAB

Note

Steve on Image Processing with MATLAB has been archived and will not be updated.

Multithreaded FFT functions in MATLAB R2009a

For the past several releases, we have been incrementally making more of the computational routines in MATLAB multithreaded. (More recently, we've also started doing this in the Image Processing Toolbox.)

For the R2009a release, readers of this blog might be particularly interested in the improvements made to the FFT functions (fft, ifft, fft2, ifft2, fftn, and ifftn).

Multithreading for the FFT functions works for two- and higher-dimensional cases, and it works for one-dimensional FFTs when multiple columns are being transformed at the same time.

In this example I time a 2048-by-2048 two-dimensional FFT using a two-core 32-bit Windows laptop.

x = rand(2048, 2048);
timeit(@() fft2(x))
ans =

    0.5443

The computation runs almost twice as fast (on my two-core machine) as it does when using the R2008b release.




Published with MATLAB® 7.8

|
  • print

评论

要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。