tehrengruber / LLDB-Eigen-Data-Formatter

LLDB Data Formatter for dense matrices and vectors of the Eigen library
GNU General Public License v3.0
42 stars 9 forks source link

Fix incorrect storage order #9

Closed planetmarshall closed 4 years ago

planetmarshall commented 4 years ago

Default storage order in Eigen is Column-Major, so for example

Eigen::Matrix<double, 3, 4> a;
a << 1, 2, 3, 4,
5, 6, 7, 8,
9, 10, 11, 12;

prints as

(Eigen::Matrix<double, 3, 4, 0, 3, 4>) $2 = rows: 3, cols: 4
[  1  5  9  2;
   6 10  3  7;
  11  4  8 12 ]
tehrengruber commented 4 years ago

Awesome! Thanks for the effort. I tend to forget about the storage order in Eigen. I will try to test on the weekend, but looks good to me.

planetmarshall commented 4 years ago

No problem - thanks for writing the pretty printer, I've found it really helpful.