Skip to content

Allow unit leading dimensions for unused eigenvectors in row-major TRSNA - #1523

Merged
langou merged 2 commits into
Reference-LAPACK:masterfrom
rioyu123:codex/lapacke-trsna-unused-ld
Nov 28, 2026
Merged

langou merged 2 commits into
Reference-LAPACK:masterfrom
rioyu123:codex/lapacke-trsna-unused-ld

Conversation

@rioyu123

@rioyu123 rioyu123 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

I used Codex to implement this change and Claude to review the code and tests.

Description

With JOB='V', TRSNA estimates eigenvector separations without reading VL or VR. On diag(1, 3), a column-major call with LDVL=LDVR=1 returns two separation estimates of 2. The same call in row-major order returns -9.

The row-major wrappers now accept a leading dimension of one for these unused arrays. Jobs that read the eigenvectors still require space for MM columns.

The regression checks the eigenpair count and both separation estimates in both layouts. All eight LAPACKE high-level test executables passed on Linux across the four precisions and both integer APIs.

Checklist

  • The documentation has been updated. N/A (the routine already documents these leading dimensions).
  • If the PR solves a specific issue, it is set to be closed on merge. N/A (no linked issue).

@codecov

codecov Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.70%. Comparing base (fab6f2c) to head (13f9e66).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1523      +/-   ##
==========================================
+ Coverage   70.65%   70.70%   +0.04%     
==========================================
  Files        6243     6243              
  Lines      501410   501402       -8     
  Branches    23516    23516              
==========================================
+ Hits       354296   354500     +204     
+ Misses     146251   145951     -300     
- Partials      863      951      +88     
Components Coverage Δ
BLAS 99.73% <ø> (ø)
CBLAS 96.95% <ø> (ø)
LAPACK 83.77% <ø> (+<0.01%) ⬆️
LAPACKE 4.42% <100.00%> (+0.24%) ⬆️
TMGLIB 55.69% <ø> (ø)
BLAS testing 88.79% <ø> (ø)
CBLAS testing 89.65% <ø> (ø)
LAPACK testing 82.41% <ø> (ø)
LAPACKE testing ∅ <ø> (∅)
Files with missing lines Coverage Δ
LAPACKE/src/lapacke_ctrsna_work.c 54.23% <100.00%> (+54.23%) ⬆️
LAPACKE/src/lapacke_dtrsna_work.c 54.23% <100.00%> (+54.23%) ⬆️
LAPACKE/src/lapacke_strsna_work.c 54.23% <100.00%> (+54.23%) ⬆️
LAPACKE/src/lapacke_ztrsna_work.c 54.23% <100.00%> (+54.23%) ⬆️

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fab6f2c...13f9e66. Read the comment docs.

@mohawk2

mohawk2 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

If you're using a coding agent, you should probably disclose that. And I'm pretty sure that reducing proportional test coverage is not in the best interest of the project.

@rioyu123

Copy link
Copy Markdown
Contributor Author

Thanks for raising this. I used Codex to implement the change and Claude to review the code and tests.

In 13f9e66 I added row-major tests for both the passing and failing cases of each leading-dimension check, including jobs that read the eigenvectors and the empty-matrix case. With gcov, all six branch outcomes on the changed checks were exercised in each of the four precisions. All 40 LAPACKE CTest targets passed locally.

@mohawk2

mohawk2 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

I see you're now getting 100% coverage on the patch, nice! I haven't looked at your other PRs, might be useful to ensure the same applies there if you didn't already.

Still none of my business, but it's probably most useful to put the disclosure stuff in the opening of the PR "comment" at the top. However, I'll let wiser and/or more knowledgeable people comment on that :-)

@rioyu123

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestions, @mohawk2. I've added the AI disclosure at the top of the PR description and checked the other two PRs.

Codecov reports 100% patch coverage for #1524, with all 24 coverable lines fully covered. For #1525, patch coverage is 66.67%. Of its 24 coverable lines, 16 are fully covered and 8 are partially covered.

@langou
langou merged commit 2737273 into Reference-LAPACK:master Nov 28, 2026
60 checks passed
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.

3 participants