discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Optimal way of performing multiple FFTs on a stre


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Optimal way of performing multiple FFTs on a stream of data
Date: Wed, 29 Sep 2010 16:59:18 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 29, 2010 at 01:47:22PM -0700, John Andrews wrote:
> Hi,
> This is more of a programming question than a gnuradio question.
> 
> I am writing a C++ block that takes in a stream of complex data, an N
> element block {B} is chosen from the stream, this block is multiplied with a
> set {M1, M2, M3...Mn} where size of each set element is N (same as data
> block) too. I want to find FFT using FFTW library on each of the products
> {B.M1, B.M2, .... B.Mn} in the general_work() function. As this can be an
> intensive task can someone suggest me what could be the optimal strategy to
> do without compromising efficiency and risk losing samples that is entering
> the machine from the USRP. I was thinking about multithreading. Do you think
> this is the way to go?
> 
> Thanks,
> John

I'd measure first, and see if you've really got a problem.
(Premature optimization is the root of all evil.)

Note also that GNU Radio itself is multithreaded, and if you're doing
substantial work in other blocks, your cores may already being put to
productive work.

Make sure that the version of FFTW you're using was built with SSE
support enabled.

  http://fftw.org/fftw3_doc/Installation-on-Unix.html

  ./configure --enable-sse --enable-float

Measure again :-)


If you do have a problem, and your cores are not already 100%
utilized, then you may want to look at using the FFTW's suport for
multithreading (inside of the package).  Note that it will only make
sense if you use one of the advanced interfaces that allows you to ask
it to compute multiple FFT's in one call to the API.  The standard
interface won't help, unless your FFTs are seriously big -- say, > 1M
points.

http://fftw.org/fftw3_doc/Multi_002dthreaded-FFTW.html
http://fftw.org/fftw3_doc/Advanced-Complex-DFTs.html

Eric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]