Eric Blossom wrote: > On Wed, Feb 01, 2006 at 03:39:57PM -0800, Eric Blossom wrote: > >>On Wed, Feb 01, 2006 at 11:32:06PM +0100, Martin Dvh wrote: >> >>>I implemented complex versions of agc and single pole iir filter. >>>To do this I had add an extra calc_type parameter to the gr_single_pole_iir >>>template. >>>(I changed all blocks that use this accordingly) >>>If this extra parameter is not wanted I could still implement a complex iir >>>filter but then I am forced to use also a complex value for the tap. >>>Which is not quite intuitive, and also has a higher computational load as >>>result. > > > On second thought, it might be easier just to ditch the template stuff > altogether and just implement the two or three versions that we care > about. I am not very handy with templates yet but I do like the concept. "Write once and only once" is a programming paradigm which prevents many errors and can save a lot of work when you add/change/optimize something later on.
So, what to do? keep the extra parameter I implemented. Use the "partial specialization" Implement different versions. Are there any examples of partial specialization in the codebase yet. Greetings, Martin > > Eric > _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
