Registered Member
|
Hi everybody,
I am using Eigen 3.0.3 and until now it has worked pretty well. I have a strange problem with a multiplication between two matrices. The two matrices are initialized just before the multiplication. The result of the multiplication is wrong for a part. The beginning is okay but not the end and I don't know why. If I print these two matrices just before the multiplication they are okay but the result is not. Here is the code not working well:
I know there are some restrictions on how to use matrices as function parameters, and I have tried different ways, but as the matrices seem right, I don't see where the error could be. Maybe I am missing something but if you could help me with that, It'd be nice.
Last edited by Koda on Tue Nov 29, 2011 12:57 pm, edited 1 time in total.
|
Moderator
|
well, maybe you could try to run your program under valgrind to detect possible memory errors.
|
Registered Member
|
Sorry, I forgot to mention that I already checked with valgrind and have no memory leaks.
Thanks for the help anyway. |
Moderator
|
Some tests:
What is the typical value of sizeStateVector ? Do you get the same results with a MatrixXd instead of a Matrix2Nd ? What if you disable vectorization by compiling with -DEIGEN_DONT_VECTORIZE ? What if you try with P.lazyProduct(H.transpose()) ? |
Registered Member
|
Typical value for sizeStateVector is between 6 and 12 here.
Yes, same results with MatrixXd. Still the same results with -DEIGEN_DONT_VECTORIZE. Once again, still the same results with the lazy product. Not good, huh? Thank you for your time. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]