Skip to content

Conversation

@iiiian
Copy link

@iiiian iiiian commented Dec 11, 2025

Description

Eigen iterative solver stores a reference to input matrix A and expect it to remain valid.

See https://libeigen.gitlab.io/eigen/docs-nightly/classEigen_1_1IterativeSolverBase.html#a3b0d9691964793bd55937666426fefbf.

Currently we do not make a copy and this results in segmentation fault when A is destroyed before the compute() call. This PR fix this by manually copying A.

An alternative solution is to have a API with clear lifetime expectancy.

Changes

  • Copy input matrix A in factorize().
  • Unify input matrix naming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant