Skip to content

COMP: Remove unused netlib linalg lsmr solver#6477

Open
hjmjohnson wants to merge 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:remove-netlib-unused-lsmr
Open

COMP: Remove unused netlib linalg lsmr solver#6477
hjmjohnson wants to merge 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:remove-netlib-unused-lsmr

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Removes the unused lsmrBase/lsmrDense least-squares solver from the vendored netlib linalg/ directory. It has no vnl_* wrapper (unlike lsqr, exposed via vnl_lsqr) and no consumer anywhere in ITK or the downstream forest — only its own self-test referenced it, so the sources were compiled-but-dead in itkv3p_netlib. Part of the VNL→Eigen numerics cleanup (#6403).

Why this is safe — verification
  • No public API: there is no vnl_lsmr class. Downstream code cannot reach lsmr through VNL's API; the only possible consumer would be a direct #include "lsmrBase.h".
  • No consumers: forest-wide grep across ITK, ANTs, BRAINSTools, Slicer, VTK found zero references outside the lsmr sources and their self-test.
  • Self-contained: after deletion, grep -r lsmr over the entire vendored vxl tree returns 0 — no other netlib routine depends on it. vnl_lsqr's linalg/ include path is untouched.
  • Local validation: reconfigure clean; itkv3p_netlib relinks without the lsmr objects; the remaining netlib tests pass 5/5 (lsqr Test1/Test2, lbfgs, lbfgsb, slamch) — only netlib_lsmrTest2 is gone.
  • pre-commit run --all-files passes.
Durable removal through the VXL fork

The netlib sources are a vendored snapshot of InsightSoftwareConsortium/vxl. To prevent the next UpdateFromUpstream.sh re-sync from resurrecting the files, the identical deletion has been landed on the fork's staging branch:

  • InsightSoftwareConsortium/vxl for/itk-vxl-master4499b01847 (COMP: Remove unused netlib linalg lsmr solver).

Following the campaign convention (cf. #6473, #6471), this PR does not bump the UpdateFromUpstream.sh tag — that happens at the next wholesale re-sync, which will now carry this removal.

The lsmrBase/lsmrDense least-squares solver in the vendored netlib
linalg/ directory has no vnl_* wrapper (unlike lsqr, which vnl_lsqr
exposes) and no consumer anywhere in ITK or the downstream forest
(ANTs, BRAINSTools, Slicer). Only its own self-test referenced it, so
the sources are compiled-but-dead weight in itkv3p_netlib. Drop the
four sources and the netlib_lsmrTest2 self-test.
@github-actions github-actions Bot added type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:ThirdParty Issues affecting the ThirdParty module labels Jun 19, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review June 19, 2026 21:28
@greptile-apps

This comment was marked as resolved.

@hjmjohnson hjmjohnson requested a review from thewtex June 20, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ThirdParty Issues affecting the ThirdParty module type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant