Re: [eigen] Re: meeting in February?

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


On Thu, Jan 14, 2010 at 12:02 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> 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

The book is good. It covers traits (chapter 15), meta functions
(chapter 17, ie. sqrt, if), loop unrolling and much more.

One simple and nice trick (I don't whether it has a cool name) which
is used in Eigen and Bjacob forgot to mention is the usage of little
helper structs (e.g. ei_matrix_swap_impl and ei_assign_impl). They
implicitly allow you to achieve a partial specialization of template
member functions without specializing the whole class which would
require you to rewrite the whole implementation - instead you only
specialize the struct and reimplement its run(...) method. I learned
about this trick very late and it's is really convenient.

@Benoit, you once referenced a paper about expression templates. Do
you recall which one it was?

- Hauke



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