discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Curiosity about implementation of block with mult


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Curiosity about implementation of block with multiple data type
Date: Thu, 30 Apr 2015 10:47:10 -0400

On Thu, Apr 30, 2015 at 9:30 AM, marco Ribero <address@hidden> wrote:
Looking better about implementation of blocks like fft,fir,etc a question rise in my brain.
Why in blocks with selectable input/output data type there are C++ multiple file, each one with the specialization of a single data type(file finishing with _cc,_ff,etc), instead of use template(and eventually explicit specialization where is necessary)?

I'm not an expert,so I'd like to understand why you have chosen an approach instead of another.

Thanks,
marco

We don't use templates because we do a lot of low-level math, especially with the use of VOLK, that's very type-specific. You couldn't call volk_32fc_x2_dot_prod_32fc in a templated FIR filter class without specializing the template for complex inputs and taps. By the time we're done, we've ended up specializing every data type so there's no point in using templates at all.

Now pre-VOLK, the reason was because SWIG was terrible about supporting templated classes and functions, so Eric invented his own version. But because we're more worried about speed, we've not bother to re-architect things with templates with the expectation that we'd just be specializing everything, anyways.

Tom


reply via email to

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