Fix pivot offset calculation for negative incx

This commit is contained in:
Martin Kroeker 2022-01-17 00:07:33 +01:00 committed by GitHub
parent 0e9e951306
commit eca2f50b48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -65,10 +65,9 @@ int CNAME(BLASLONG n, BLASLONG k1, BLASLONG k2, FLOAT dummy1, FLOAT *a, BLASLONG
a--;
k1 --;
#ifndef MINUS
ipiv += k1;
#else
ipiv -= (k2 - 1) * incx;
#ifdef MINUS
ipiv -= (k2 - k1 - 1) * incx;
#endif
if (n <= 0) return 0;