[eigen] JacobiSVD::compute does malloc for non-square matrices

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

I'm trying to use the SVD in a real-time process, so I can't do any malloc. I found that my SVD (JacobiSVD) was doing some malloc, even when the pre-allocation ctor is used. The jacobi unit tests (jacobisvd_preallocate) does make this validation, but only for a square 3x3 matrix. The same test fail when using non-square matrices. Here is an example of a failing test:
bool testSVDNoMalloc()
    const int rows = 15;
    const int cols = 15;
    Eigen::MatrixXd A = Eigen::MatrixXd::Random(rows, cols);
    Eigen::JacobiSVD<Eigen::MatrixXd> svd1(rows, cols);
    return true;
Is this a bug or maybe I misunderstood something?
Thank you,
Philippe Hamelin
, ing. jr, M. Ing
Chercheur / Researcher

T: 450-652-8499 x2198
F: 450-652-1316

Expertise robotique et civil
Institut de recherche d'Hydro-Québec (IREQ)
1740, boul. Lionel-Boulet
Varennes (QC) J3X 1S1, Canada


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/