You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect handling of negative vector increments in xLARF, xLARF1F and xLARF1L APIs #1314
While working with xLARF, xLARF1F and xLARF1L we found a bug with
handling of input vector V with negative increments. xLARF1F and xLARF1L
directly give incorrect result with negative increments.
xLARF with negative increment gives correct result for normal cases but
fails when there are trailing zeroes in the input vector V. The API
does not properly set the index for V while skipping the trailing zeroes.
We have created a standalone test program larf_test.f.txt to reproduce the issue and have attached it here for reference.
The test program takes the following input parameters:
M: Number of rows in matrix C
N: Number of columns in matrix C
INCV: Increment for vector V (can be negative)
LDC: Leading dimension of matrix C
NUM_V_ZEROES <optional>: Number of skippable leading/trailing zeroes in vector V
NUM_C_ZEROES <optional>: Number of skippable zero rows/columns in matrix C
Sample run to reproduce the issue: ./larf_test 10 10 -1 10 2
We have created a patch to fix these issues.
If you are interested, we can submit a pull request with the patch or share the patch file directly for further review.
Please let me know if you have any questions or need further information.
Best regards,
Checklist
I've included a minimal example to reproduce the issue
Activity
mgates3 commentedon Jun 19, 2026
Yes, please submit a PR.
sameer-amd-in commentedon Jun 21, 2026
Submitted the PR. Please provide feedback whenever possible.
Thanks.
BUG: Port upstream LAPACK fixes for wrong results in xSYTRF/xHETRF, x…