Created attachment 566 [details] Repro code While trying to see whether #980 (http://eigen.tuxfamily.org/bz/show_bug.cgi?id=980) was solved on the default branch with one of our tests, I noticed an error in the actual result. If we do: v += m1.transpose (); where v is a SparseVector<double> and m a SparseMatrix<double> with the adequate size, some inner loop in Eigen's code appears to be done with the wrong size (1 instead of the vector size), resulting in a wrong result. Repro code: https://gist.github.com/bchretien/29827af68edae49cd6d7 (attached) Output: (1,2) (1,2) (1,2) (2,2) (3,4) Expected output: (1,2) (1,2) (1,2) (2,4) (3,6)
Here is a workaround until this gets fixed: v += sparseVector_t(m1.transpose ());
Since the storage order of v and m1.transpose do not match, this should not even compile (this is the case with eigen 3.2). I also see that "sparse colmajor" + "sparse rowmajor" does compile in the devel branch, meaning that a static assert has been improperly deactivated. Let me investigate...
Fixed. Let me also emphasize that the "workaround" proposed by Christoph is actually not a workaround, but a requirement. https://bitbucket.org/eigen/eigen/commits/e99ca53c931b/ Changeset: e99ca53c931b User: ggael Date: 2015-06-08 08:14:08+00:00 Summary: Bug 1005: fix regression regarding sparse coeff-wise binary operator that did not trigger a static assertion for mismatched storage
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1005.