-
Notifications
You must be signed in to change notification settings - Fork 10
use Eigen abstract types instead of concrete types when possible #62
Comments
On 04/18/2013 07:16 AM, Thomas Moulard wrote:
Regarding the matrix implementation we could but I do not think it is a More generally, the way the data are stored is still not fixed due to
This may lead to dramatic changes between releases. Finally due to other commitments, my current involvment in metapod However the confVector issue should be not too difficult to fix, I'll
|
Sorry, I was not clear enough. You currently have:
You should replace it by:
...this would not impact the performances as the type will be resolved at compile time. |
regarding the scalar type, the current plan is to template all the Spatial classes and the models ones by the Scalar type, à la Eigen. Yes the current code involves copies and conversion to concrete Eigen types, which should be avoided. An alternative to your suggestion would be to use the new "Ref" classes that Eigen 3.2 (not released yet) introduces. |
Yes, unfortunately, Ref are very new and I had some trouble with block operations with them. Also relying on bleeding edge version makes metapod a bit harder to use. But I agree with you, in a couple of months, ref may be the solution to a lot of problems :) |
Dear all, |
I would like some comments/review before merging to the master (soon). |
FYI Eigen 3.2.0 contains Ref. They allow to pass matrices independently of their real type (block, etc.) without requiring the code to be templated. It would be perfect to implement this feature with Ref(s). Sorry I don't have time to do that myself though. |
Dear all,
I have the following code which is sub-optimal:
...the following version would avoid a copy but is not possible right now:
Would it be possible to make sure that algorithms and functions take a
EigenBase<T>
,MatrixBase<T>
or any other adequate abstract type instead of concrete type so that metapod can avoid enforcing its own matrix typeconfVector
to everyone.A side effect would be to let the user choose its own scalar type, matrix implementation, etc. which could lead to many potential optimization on the end-user side.
Thanks!
The text was updated successfully, but these errors were encountered: