Strip lapacke.h to only the declarations used by Eigen

Summary

  • Remove 948 unused LAPACKE function declarations from Eigen/src/misc/lapacke.h
  • Keep only the 32 declarations (8 routines × 4 type variants) Eigen actually calls: potrf, getrf, geqrf, geqp3, gees, gesdd, gesvd, syev/heev
  • Preserve all required type definitions, constants, callback typedefs, and name mangling macros
  • 10,085 lines (860KB) → 218 lines (~8KB) — 97.8% reduction

This eliminates a major source of conflicts with system LAPACK headers (non-standard const qualifiers, missing parameters) reported in the issue.

Test plan

Local Docker (GCC 15, CMake 3.31, Debian trixie, C++17):

Test suite Tests Result
eigen_blas library build links OK
eigen_lapack shared library build links OK
cholesky 6 variants 6/6 pass
lu 2 variants 2/2 pass
inverse 5 variants 5/5 pass
qr 7 variants 7/7 pass
eigensolver_selfadjoint 13 variants 13/13 pass
eigensolver_generic 5 variants 5/5 pass
product_large 9 variants 9/9 pass
Total 42 tests + 2 library builds 42/42 pass

Closes #2851 (closed)

Edited by Pavel Guzenfeld

Merge request reports

Loading