Browse Source

Merge pull request #3514 from martin-frbg/issue3513

Fix ?LASWP pivot index calculation for negative increments other than -1
tags/v0.3.20
Martin Kroeker GitHub 3 years ago
parent
commit
8ac2c1daf0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 21 deletions
  1. +2
    -3
      lapack/laswp/generic/laswp_k_1.c
  2. +2
    -3
      lapack/laswp/generic/laswp_k_2.c
  3. +2
    -3
      lapack/laswp/generic/laswp_k_4.c
  4. +2
    -3
      lapack/laswp/generic/laswp_k_8.c
  5. +2
    -3
      lapack/laswp/generic/zlaswp_k_1.c
  6. +2
    -3
      lapack/laswp/generic/zlaswp_k_2.c
  7. +2
    -3
      lapack/laswp/generic/zlaswp_k_4.c

+ 2
- 3
lapack/laswp/generic/laswp_k_1.c View File

@@ -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;


+ 2
- 3
lapack/laswp/generic/laswp_k_2.c View File

@@ -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;


+ 2
- 3
lapack/laswp/generic/laswp_k_4.c 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;


+ 2
- 3
lapack/laswp/generic/laswp_k_8.c View File

@@ -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;


+ 2
- 3
lapack/laswp/generic/zlaswp_k_1.c View File

@@ -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;


+ 2
- 3
lapack/laswp/generic/zlaswp_k_2.c View File

@@ -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;


+ 2
- 3
lapack/laswp/generic/zlaswp_k_4.c View File

@@ -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…
Cancel
Save