Re: [eigen] A template puzzler, or, templated custom scalar types

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


On Fri, Jun 17, 2011 at 12:40 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx> wrote:
I guess your are talking about Eigen 2, since in 3.0 we resolved that
issue by moving such functions to NumTraits.

Ah, I see. We are going to move to Eigen 3.0 sometime, but probably not immediately.
 
In your case I'm afraid you will have to specialize them for each
configuration of scalar/type that you plan to use.... some macros here
might help.

Macros are a good idea and is what I will do.

(in Eigen3 we already have such an autodiff class)

Our code is somewhat tied to our autodiff implementation, so for now we'll stick with it. It looks like there aren't any docs for the autodiff code, but I'll check it out in more detail soon.

Thanks for the suggestions,
Keir


gael

On Fri, Jun 17, 2011 at 1:15 AM, Keir Mierle <mierle@xxxxxxxxx> wrote:
> I have a custom type. It's a small autodiff variable, templated on scalar
> type and size. Everything works great; however, things break down when I
> attempt to use the LU decomposition. The trouble is that the precision() and
> machine_epsilon() functions use template specializations to resolve the
> type, which for some reason, doesn't work.
> Is it possible to use Scalar types that are themselves templated?
> Thanks,
> Keir





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