Re: [eigen] removing^W keeping meta-unrollers

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi List,

after a lot of manual unrolling I benchmarked the result and got poor 
performance because gcc refused to inline the functions with the unrolled 
loops, even with the always_inline attribute.

So finally I think we should keep the meta-unrollers. To address the issues 
that I reported:
 -- specializing the template metaprogram the bogus case Size==0 is effective 
at preventing infinite recursions, so that problem is solved.
 -- it turns out that compilation was not measurably faster with hand-unrolled 
loops
 -- I'll adapt the CopyHelper metaprogram to handle the case where one only 
unrolls across one direction.

That's all for now, I have a ton of local changes, the Core should be ready 
within 1 week now.

Cheers,
Benoit


On Sunday 09 December 2007 11:19:58 Benoît Jacob wrote:
> Hi List,
>
> I'm about to remove the meta-unrollers and replace them by manual
> unrolling.
>
> Rationale:
> - meta-unrollers give very very long and useless compiler output when there
> is an error in the calling program, e.g. a matrix with 0 rows.
> - in most cases (that is, everywhere except in CopyHelper) manually
> unrolling takes LESS lines of code (and is much more explicit) than
> meta-unrolling. - in CopyHelper, we weren't handling all cases anyway. If
> e.g. the number of rows is known at compile-time but not the number of
> columns, our
> meta-unroller did not partially unroll (and I know Cyrille has a use case
> for that). Modifying it to handle that case would probably again make it
> longer than manual-unrolling.
> - manual unrolling is easier on the compiler, and the code is far easier to
> read and maintain.
>
> Cheers,
>
> Benoit


Attachment: signature.asc
Description: This is a digitally signed message part.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/