|Re: [eigen] A template puzzler, or, templated custom scalar types|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] A template puzzler, or, templated custom scalar types
- From: Keir Mierle <mierle@xxxxxxxxx>
- Date: Fri, 17 Jun 2011 10:42:58 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=GYetbH1W5YtZyDyLoLNw8dUnRqgclkjB8NVLmnvR3zU=; b=BvJxfn4WlzE/2PR5zNtGFdlh7MS3k4bHFoka5ji+1qOrf/Ekxvhumyp8A6ZayREBF/ mrn1/Gwc0kREhgnL+f/YXhXoUYyBo6gouN7VdO0oMIZT/E6QfQTtTG8vILopXtPV66h7 0DrdjVcn9TwIYQ4Id97uFGimlAy7j3KkLgRD0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dntH+kZjlluPC5NRE8bJN+sZHudNqR7dUycDnKIvKOLGmWLrJrTt79ILYdooY5hC8y tn8x7KCIAM7sAqX1PTn1WO+TyaOqT8IQUXe9Ap1ssDMPb1M1xHfwpCE/tV3aLTQCePoV Z1F0/aViQ6/K8DgYgqfz3i1IJ2eadT6udwqDU=
On Fri, Jun 17, 2011 at 12:40 AM, Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
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
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,
On Fri, Jun 17, 2011 at 1:15 AM, Keir Mierle <mierle@xxxxxxxxx
> 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?