[eigen] Matrix-Matrix Multiplication gives incorrect results (C++11, sometimes) |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
Hi all, I'm using dynamic row-major Eigen3 matrices. Within my code I'm generating a (n-1)xn matrix (Q_pre) and post-prefix it with a zero-row to get a nxn matrix Q. Afterwards I'll need to square it, which gives me QQ. (see 'problematic.cpp' in [1]) However, the resulting matrix QQ has its "last" (bottom-right) entry incorrectly computed. (see 'OUT: problematic' in [1]) I composed a minimal example and compiled it with the same compiler (and options) just to discover that everything goes fine. Am I missing something? Neither of the tested compilers (GCC 4.8.3, 4.9..1, Clang 3.4.2, 3.5.0) on a 64bit openSUSE 13.1 all with Eigen3 3.2.2 has a different behaviour. Nor does any of the compilers complain about anything when run with `-Wall -Wextra -Wpedantic -g -O0 -std=c++11`. Kind regards, Torbjörn Klatt [1] https://gist.github.com/torbjoernk/70731289e5a8f054bc67
Attachment:
signature.asc
Description: This is a digitally signed message part.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |