[Top][All Lists]

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

[Discuss-gnuradio] Re: patch to add complex implementations of agc and s

From: Eric Blossom
Subject: [Discuss-gnuradio] Re: patch to add complex implementations of agc and single pole iir filter
Date: Wed, 1 Feb 2006 15:39:57 -0800
User-agent: Mutt/1.5.6i

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.

Hi Martin,

I think you can get what you want without adding the extra template
parameter by using "partial specialization" (or at least not having
the user have to mess with the extra template parameter)  See C++ docs.

Basically you want some template hackery that is equivalent to:

  if i_type is gr_complex and tap_type is float or double
    do special case 1

    do it the way it is now

I think you can get the template instantiation logic to infer calc_type for you.


reply via email to

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