Skip to content

Commit eca2f50

Browse files
authoredJan 16, 2022
Fix pivot offset calculation for negative incx
1 parent 0e9e951 commit eca2f50

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎lapack/laswp/generic/laswp_k_4.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,9 @@ int CNAME(BLASLONG n, BLASLONG k1, BLASLONG k2, FLOAT dummy1, FLOAT *a, BLASLONG
6565
a--;
6666
k1 --;
6767

68-
#ifndef MINUS
6968
ipiv += k1;
70-
#else
71-
ipiv -= (k2 - 1) * incx;
69+
#ifdef MINUS
70+
ipiv -= (k2 - k1 - 1) * incx;
7271
#endif
7372

7473
if (n <= 0) return 0;

0 commit comments

Comments
 (0)
Please sign in to comment.