Merge pull request #3514 from martin-frbg/issue3513
Fix ?LASWP pivot index calculation for negative increments other than -1
This commit is contained in:
commit
8ac2c1daf0
|
@ -57,10 +57,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;
|
||||
|
|
|
@ -59,10 +59,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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -78,10 +78,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;
|
||||
|
|
|
@ -59,10 +59,9 @@ int CNAME(BLASLONG n, BLASLONG k1, BLASLONG k2, FLOAT dummy1, FLOAT dummy4,
|
|||
lda *= 2;
|
||||
k1 --;
|
||||
|
||||
#ifndef MINUS
|
||||
ipiv += k1;
|
||||
#else
|
||||
ipiv -= (k2 - 1) * incx;
|
||||
#ifdef MINUS
|
||||
ipiv -= (k2 - k1 - 1) * incx;
|
||||
#endif
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
|
|
@ -60,10 +60,9 @@ int CNAME(BLASLONG n, BLASLONG k1, BLASLONG k2, FLOAT dummy1, FLOAT dummy4,
|
|||
lda *= 2;
|
||||
k1 --;
|
||||
|
||||
#ifndef MINUS
|
||||
ipiv += k1;
|
||||
#else
|
||||
ipiv -= (k2 - 1) * incx;
|
||||
#ifdef MINUS
|
||||
ipiv -= (k2 - k1 - 1) * incx;
|
||||
#endif
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
|
|
@ -69,10 +69,9 @@ int CNAME(BLASLONG n, BLASLONG k1, BLASLONG k2, FLOAT dummy1, FLOAT dummy4,
|
|||
lda *= 2;
|
||||
k1 --;
|
||||
|
||||
#ifndef MINUS
|
||||
ipiv += k1;
|
||||
#else
|
||||
ipiv -= (k2 - 1) * incx;
|
||||
#ifdef MINUS
|
||||
ipiv -= (k2 - k1 - 1) * incx;
|
||||
#endif
|
||||
|
||||
if (n <= 0) return 0;
|
||||
|
|
Loading…
Reference in New Issue