Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-01-15 07:42:15


"Vesa Karvonen" <vesa_karvonen_at_[hidden]> writes:

>>What do you mean by "maximal iteration counts?"
>>If you mean, "the maximum possible under a given depth limitation",
>>then clearly there's no such number because you can always do more
>>unrolling... so obviously you don't mean that. ;-)
>
> Well, one thing that does have an effect on the maximum iteration
> count with a given depth limitation is the initial "tree height"
> from where you start:
>
> template<class P, class O, class X>
> struct until : mpl::apply_if<mpl::apply1<P,X>,
> mpl::identity<X>,
> until_up<3,P,O,X> > {};
> ^
>
> Changing the above number does have an effect on the maximum iteration count.
>
> Another thing that does have an effect on maximal iteration count is
> the way that the until, until_up and until_down templates are
> programmed. If you can avoid a single recursion in their code, it
> can have a big effect (superlinear) on the total maximum iteration
> count.

Okay. In that case, my answer to you is: "getting truly maximal
iteration counts with this strategy depends on encoding intimate
knowledge of the depth limit in the implementation"

-- 
                       David Abrahams
   dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk