Skip to content

LAPACKE/tprfb_work: fix row-major A dimensions for SIDE='R'#1287

Open
jschueller wants to merge 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue734
Open

LAPACKE/tprfb_work: fix row-major A dimensions for SIDE='R'#1287
jschueller wants to merge 1 commit into
Reference-LAPACK:masterfrom
jschueller:issue734

Conversation

@jschueller

Copy link
Copy Markdown
Contributor

The row-major path hardcoded lda_t = MAX(1,k), which is only correct when SIDE='L' (A is K-by-N). When SIDE='R', A is M-by-K and the transposition dimensions, allocation, and leading-dimension checks were all wrong.

  • Introduce nrowsA/ncolsA/nrowsV determined by SIDE (following the same pattern as the LAPACKE_?tpmqrt_work fix in PR Fix error on LAPACKE_*tpmqrt_work for ROW MAJOR matrices #540).
  • lda_t now uses nrowsA instead of always k.
  • lda check compares against ncolsA instead of always m.
  • A transpose uses (nrowsA, ncolsA) instead of (k, m).
  • LDV check depends on STOREV: ldv >= nrowsV for STOREV='C', ldv >= k for STOREV='R'.
  • V transpose uses nrowsV rows instead of ldv.

Closes #734

The row-major path hardcoded `lda_t = MAX(1,k)`, which is only correct
when SIDE='L' (A is K-by-N). When SIDE='R', A is M-by-K and the
transposition dimensions, allocation, and leading-dimension checks were
all wrong.

- Introduce nrowsA/ncolsA/nrowsV determined by SIDE (following the
  same pattern as the LAPACKE_?tpmqrt_work fix in PR Reference-LAPACK#540).
- lda_t now uses nrowsA instead of always k.
- lda check compares against ncolsA instead of always m.
- A transpose uses (nrowsA, ncolsA) instead of (k, m).
- LDV check depends on STOREV: ldv >= nrowsV for STOREV='C',
  ldv >= k for STOREV='R'.
- V transpose uses nrowsV rows instead of ldv.

Closes Reference-LAPACK#734
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.

Apply fixes from #540 to LAPACKE_?tprfb_work

1 participant