Re: [eigen] Re: meeting in February?

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


2010/1/13 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:
>
> On Wednesday 13 January 2010 14:09:42 Benoit Jacob wrote:
>> to determine:
>>  - when you want to do this (not Friday, too busy already)
>>  - what exactly you want to hear about.
>
> I would indeed be very interested by some presentation about eigen internals. I don't care when, and I would be interested by a global design overview :
> * class hierarchy : why/benefits
> * file hierarchy : why/benefits
> * global stuff : traits, returnsbyvalue

OK, we can definitely do this and this is a reasonable program. Other
people, speak up too if you have ideas!

>
> Oh, and i would also appreciate a recommendation for a good reading in templates/expression/traits/c++metaprogramming that I could read before the meeting :-)

About templates in general, we have this book in the magic library:
http://download.tuxfamily.org/eigen/vandevoorde1.chm

I never read it, but perhaps it can be useful!

For metaprogramming in general, you could have a look at Eigen's files
Meta.h and XprHelper.h, there's a lot of stuff there. For example:
 - look up the code for ei_meta_if and understand what it's doing
 - same for ei_int_if_dynamic
 - same for ei_meta_sqrt

For traits, there's nothing more really than what I wrote a few days
ago on this list, it's just helper structs that hold enums and
typedefs, and whose reason to existence is to forward-declare stuff.

Another pattern that we use all the time is the CRTP, do you
understand it fully? E.g. between MatrixBase<T> and T.

Another very common pattern throughout Eigen is meta-selectors to
perform a "if" at compile time and not waste any time compiling the
dead branch. Do you understand that?

Finally, in order to fully expression templates, perhaps the best you
could do is go back to a primitive state of eigen2 from the early days
when there were just 1000 lines of code in total. Would it help to
prepare a guided tour of the early eigen2 expression templates at
various stages until we reached the current design?

Benoit

>
> best wishes!
> Thomas
> --
> Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
> http://www.freehackers.org/thomas
>
>



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