Re: [eigen] AutoDiffScalar

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


I've done some more testing and got the class to work for
fixed/dynamic/sparse cases 1st and 2nd derivatives.
There are some minor bugs in the code and I had to rewrite
CompressedStorage to handle non-POD data types(evil memcpy's).
You are obviously still working on the code, so I was wondering how I
should submit any fixes.
Clone the repository and submit a  patch queue/pull request?

There is also the question of performance. For second and higher order
derivatives There is a need to differentiate the type Scalar from the
underlying primitive type. let's call it Real for now.

E.g.

typedef AutoDiffScalar<Matrix<double, Dynamic, 1> > D1;
typedef AutoDiffScalar<Matrix<Fad1  , Dynamic, 1> > D2;

D1::Scalar == double
D1::Real   == double

D2::Scalar == D1
D2::Real  == double

Then the overloads should be
AutoDiffScalar OP AutoDiffScalar::Real
instead of
AutoDiffScalar OP AutoDiffScalar::Scalar

That should lead to resize()/zero() being called significantly less often.



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