Skip to content

Update HouseholderSequence.h

Applying a Householder sequence to the left of a vector (mostly commonly Q from a QR factorization) results in an avoidable heap allocation. Previous fix did not consider right hand sides with fixed number of columns when the argument inputIsIdentity is true. This fix checks inputIsIdentity, and if true, uses a dynamic size block with bottomRightCorner(). Otherwise, a fixed size column block with bottomRows() is used which implicitly passes 'Dest::ColsAtCompileTime'. Same logic is applied to the block case. Passing Dest::ColsAtCompileTime to internal::apply_block_householder_on_the_left revealed a typo: TFactorSize should correspond to VectorsType::ColsAtCompileTime.

Merge request reports

Loading