
21 Mar
2011
21 Mar
'11
11:12 p.m.
On 21/03/2011 18:45, Dave Abrahams wrote:
Typically what you do with a generic library is that you write generic algorithms for arbitrary datatypes and then specialize them to dispatch to LAPACK when the types can be handled directly. That way you can still get a reasonably-performant matrix-of-matrices or matrix-of-rationals and get screamin'-hot performance for floats and doubles.
From my experience I found that when efficiency is one of the main cocners, it often worked better the other way around: write the algorithm optimally, and then see how you can generalize it. also, writing multiple implementations requires time, which is somewhat restricted during a GSoC.