This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1739 - GeneralizedSelfAdjointEigenSolver not preallocating all internal data
Summary: GeneralizedSelfAdjointEigenSolver not preallocating all internal data
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Eigenvalues (show other bugs)
Version: 3.3 (current stable)
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-09 20:24 UTC by Flavio Protasio Ribeiro
Modified: 2019-12-04 18:44 UTC (History)
5 users (show)



Attachments
Repro case (769 bytes, text/plain)
2019-08-09 20:24 UTC, Flavio Protasio Ribeiro
no flags Details
Adding preallocations in GeneralizedSelfAdjointEigenSolver (4.33 KB, patch)
2019-08-09 21:26 UTC, Flavio Protasio Ribeiro
no flags Details | Diff

Description Flavio Protasio Ribeiro 2019-08-09 20:24:40 UTC
Created attachment 947 [details]
Repro case

GeneralizedSelfAdjointEigenSolver and components it depends on (SelfAdjointEigenSolver, Tridiagonalization and Householder) are dynamically creating temporary objects, even when the constructor with memory preallocation is used.

Source code with repro case is attached.
Comment 1 Flavio Protasio Ribeiro 2019-08-09 21:26:29 UTC
Created attachment 948 [details]
Adding preallocations in GeneralizedSelfAdjointEigenSolver

Here's a patch for the top level component to get the ball rolling.

GeneralizedSelfAdjointEigenSolver supports 3 types of eigenproblems, and they have different memory requirements. This patch preallocates the LLT object and the matC matrix. This meets all the preallocation requirements for eigenproblem Ax_lBx.

Eigenproblems ABx_lx and BAx_lx involve an additional triple matrix product L'*A*L which requires a temporary matrix. The patch doesn't preallocate this temporary, since I don't know what Eigen's memory usage policy/philosophy is. If we preallocate the temporary yet the user only cares about Ax_lBx, then we're wasting memory. The user might care if they're working with huge matrices.
Comment 2 Nobody 2019-12-04 18:44:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1739.

Note You need to log in before you can comment on or make changes to this bug.