Fix LDSWORK being overwritten during workspace query in xTRSYL3#1206
Merged
langou merged 1 commit intoReference-LAPACK:masterfrom Mar 24, 2026
Merged
Conversation
Contributor
nakatamaho
commented
Mar 24, 2026
Remove the erroneous "LDSWORK = 2" assignment inside the LQUERY branch of STRSYL3, DTRSYL3, CTRSYL3, and ZTRSYL3. The assignment overwrites the caller's input argument, which is declared as intent(in) in the documentation. The assignment was unnecessary because SWORK(1,1) and SWORK(2,1) access column 1 only, making the leading dimension irrelevant for these stores (offset = (i-1) + (j-1)*LDSWORK, j=1).
nakatamaho
added a commit
to nakatamaho/mplapack
that referenced
this pull request
Mar 24, 2026
Remove the erroneous "LDSWORK = 2" assignment inside the LQUERY branch of STRSYL3, DTRSYL3, CTRSYL3, and ZTRSYL3. The assignment overwrites the caller's input argument, which is declared as intent(in) in the documentation. The assignment was unnecessary because SWORK(1,1) and SWORK(2,1) access column 1 only, making the leading dimension irrelevant for these stores (offset = (i-1) + (j-1)*LDSWORK, j=1). cf. Reference-LAPACK/lapack#1206
langou
approved these changes
Mar 24, 2026
Contributor
|
I agree that LDSWORK = 2does not work with the intent "input only" for |
Contributor
|
The declaration of Line 211 in eb5f719 with the variable LDSWORK set to -1 is interesting. I had not realized this was a thing.
|
nakatamaho
added a commit
to nakatamaho/mplapack
that referenced
this pull request
Apr 10, 2026
… xTRSYL3 Add two upstream LAPACK patches for the bundled 3.12.1 sources: - fix test parameters Reference-LAPACK/lapack#1211 - fix LDSWORK being overwritten during workspace query in xTRSYL3 Reference-LAPACK/lapack#1206
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.