Fix pivot offset calculation for negative incx

This commit is contained in:
Martin Kroeker
2022-01-17 00:08:20 +01:00
committed by GitHub
parent eca2f50b48
commit afa0cece5c

View File

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