[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: [eigen] Thin JacobiSVD
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Fri, 8 Jun 2012 15:00:23 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=4twx25EmhqbgX3z6W8sWWoWVIIQJ82msbUNy5R/wDCU=; b=rQayMW7Xl/hme745ATRiUQpckjpgJiCL7IJoIO35M4QXI/teF9y+Lr3Xl4CsPu9Js5 U6FXmwbH+UZOKPhoqKQeLSoW9GcIQxG7Onb1L38YjkiaUtWeW2JdnVhL+NKxDLX6nIZx rkH501p0zuUNkYb8rChZTVkUQU4ESDFAv1zbyaz+Vu1NEYs4inMYOL3BIPilv35Sb854 jhzu43GEeNkyG3ldptOoIxE3JaEKlT5cogbq/VbKT5RWxzN98EQZAcSCeW57sUHX9NNw jjKN9k/jcL/TkZEJrcQxKqci2PvNeKcUpqy02eS6Iak46mFs9D/yy+0ZWTH+VxRTtUcU CHng==
Hi,
currently JacobiSVD cannot compute a thin factorization with a fixed
number of columns. This is because the 'thin' status is provided at
runtime while fixed dimensions have to be known at compile-time.
However, a typical use case for JacobiSVD is to solve for a
Matrix<scalar, Dynamic or large_value, small_value> matrix with a
small fixed number of columns but many rows.
I see three options:
One option would be to relax the JacobiSVD's matrix types for the U
factor to always use a dynamic number of columns, but keep
MaxRowsAtCompileTime for the max column size to keep static allocation
when possible. The drawback is that we cannot exploit a fixed number
of columns for unrolling or other optimizations.
This last limitation could be addressed by instancing the code twice
(thin and full), and do a dynamic branching.
The last option I see, and perhaps my favorite, would be to add a
ThinJacobiSVD class (on top of the general JacobiSVD) that would
always compute the thin U and thin V. This variant would be ideal for
solving: it would prevent the need to add ComputeThinU|ComputeThinV
every time. I'm pretty sure it would cover 90% of the use cases. Of
course we would also add a .thinJacobiSVD() member to MatrixBase.
Any opinion?
cheers,
Gael, who is trying to restart some dynamism in Eigen's development;)