Registered Member
|
Eigen 3.2.4, GCC 4.9.2 20141224, Linux 3.18.5 / Arch, 64bit
Hello, I have a piece of code:
and compile it with:
If FLAGS = -O0 executing works without any error. If FLAGS = -O1 or -O2 or -O3 it crashes with:
Compilation with FLAGS = -02 -g3 gives an backtrace within gdb:
Any idea what's wrong here? Thanks, Florian |
Registered Member
|
Does it work if you replace all the "auto" declarations with the correct type (I think "MatrixXd" in all the cases)? Eigen is an expression template library and most functions return an expression object which is only evaluated when it is assigned to a variable of type Matrix. As a consequence, it is dangerous and usually wrong to use "auto".
|
Registered Member
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]