[Accumulators]multiple statistic instances

I am trying to create an IIR filter (see e.g., http://en.wikipedia.org/wiki/IIR) using the delay buffer implementation recently discussed. To do this I need two delay buffers for my filter, one for the samples and one for the computed outputs. I have tried templating my delay buffer with a discrimating type, but I can't get more than one buffer instantiated. ie the following creates only one buffer instantation. accumulator_set<int, stats< tag::delay<>, tag::delay<my_other_delay> > > acc( tag::delay<>::cache_size = 3, tag::delay<my_other_delay>::cache_size = 4 ); Is this worth perservering with? any hints? or would it be better to wait for the next version of accumulators?

Hugo Duncan wrote:
I am trying to create an IIR filter (see e.g., http://en.wikipedia.org/wiki/IIR) using the delay buffer implementation recently discussed.
To do this I need two delay buffers for my filter, one for the samples and one for the computed outputs.
I have tried templating my delay buffer with a discrimating type, but I can't get more than one buffer instantiated. ie the following creates only one buffer instantation.
accumulator_set<int, stats< tag::delay<>, tag::delay<my_other_delay> > > acc( tag::delay<>::cache_size = 3, tag::delay<my_other_delay>::cache_size = 4 );
Is this worth perservering with? any hints? or would it be better to wait for the next version of accumulators?
That should work. But you'll have to send me your code before I can figure out what's going on. Try to make it as small as possible. -- Eric Niebler Boost Consulting www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com

I have uploaded the IIR filter in the vault (updated previous upload). In the end I didn't need the discriminator, but I left it in.
participants (2)
-
Eric Niebler
-
Hugo Duncan