Ok I've understood. Thank you for your answer. Have a good day, Marco
Il giorno gio 30 apr 2015 16:47 Tom Rondeau <t...@trondeau.com> ha scritto: > On Thu, Apr 30, 2015 at 9:30 AM, marco Ribero <spam.marco.s...@gmail.com> > 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 > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio