Re: [eigen] AutoDiffScalar |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] AutoDiffScalar
- From: Björn Piltz <bjornpiltz@xxxxxxxxxxxxxx>
- Date: Wed, 28 Oct 2009 15:31:19 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=glHgBnZ8/y3AhKlTgZUeGarK9LoWFykgK9+Ztvz7VPM=; b=aHWRIT/iCsfc7Rch56Mt4gLIRPJgkQfbkVWEv1vm70In2L9yoxeHIO0eImQfnbzBi7 nQ00iSl3xhxVhDdEwYzLSeXRK69iQypc5CyyxRG3ABdPtH8DDtnKUkhmxBmge3czgEyK Rzw6pLFlBdzoocLlMgkQXjlyb7hSEZOTwlj2o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=jSaKG8eiWxg4Hi4P2Uie6tdw7Z6+BJIAG8Qxf9E/Ud1xr6J/cHXkzudv43nB+2UlHZ Pk29CXOZYGKT6cTu1YL86g+5zXnqbVQFHq+GBM7tfmtKYft31miPKCarTXGbhqiTl/7l jNzinhM2dCd6e7HuQyfg9qi3pJ/bBDOv6THPA=
Ok, I've pushed my changes to https://bitbucket.org/bjornpiltz/autodiff. It would be great if you could take a look!
I'm getting performance like:
Computing first order:
Fixed Dynamic Sparse
Eigen 72 ms 427 ms 718 ms
Sacado 194 ms 430 ms
Computing second order:
Fixed Dynamic Sparse
Eigen 553 ms 7813 ms 13983 ms
Sacado 1002 ms 3617 ms
The first goal performance-wise should be to make the second order dynamic case as fast as Sacado.
If you remember I suggested doing something like:
template<typename T>
struct MyTraits
{
};
template<>
struct MyTraits<double>
{
typedef double Real;
};
template<>
struct MyTraits<float>
{
typedef float Real;
};
template<typename DerType>
struct MyTraits<AutoDiffScalar<DerType> >
{
typedef MyTraits<AutoDiffScalar<DerType>::Real>::Real Real;
};
I think this should be put outside of the AutoDiff module, if you want Eigen to support matrices of matrices. I just don't know where exactly.
Björn