Created attachment 473 [details] Demo reproducing the bug Our internal::triangular_matrix_vector_product is specialized for triangular matrix-vector product. When 1x1 times 1xn, it ends prematurely by computing only one entry. The below is the output from the program compiled with the attachment. Matrix: 0.144509 0.0973679 -0.228021 0.190039 -0.105256 -0.131808 0.0489002 0.160188 Triangular: 0.144509 0 0 0 0 0 0 0 ?TRMV: 0.144509 0 0 0 0 0 0 0 ?TRMM: 0.144509 0.0973679 -0.228021 0.190039 -0.105256 -0.131808 0.0489002 0.160188
I see where the problem is. When TriangularProduct invokes internal::trmv_selector, side information is lost. We assumed that if the non-triangular is column-vector then the triangular is on the left. However, it is possible that the triangular is row-vector on the right. I am working on a patch to internal::trmv_selector.
I found that no refactorization is needed. I have made a pull request. https://bitbucket.org/eigen/eigen/pull-request/72/fix-bug-839
https://bitbucket.org/eigen/eigen/commits/3823970ee330/ https://bitbucket.org/eigen/eigen/commits/21dbcb6c5dec/
-- 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/839.