Boost logo

Boost :

From: Vesa Karvonen (vesa_karvonen_at_[hidden])
Date: 2003-01-15 07:28:30


David Abrahams:
>Vesa Karvonen:
> > It seems to be quite tricky to reach maximal iteration counts using
> > this technique. I think that others might have more insight into how
> > to tune the code for maximal iteration counts.
>
>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.

-Vesa Karvonen

_________________________________________________________________
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail


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