Browse Source

Merge pull request #2097 from martin-frbg/rela-getrf

Correct INFO=4 condition in ReLAPACK xGETRF
tags/v0.3.6^2
Martin Kroeker GitHub 6 years ago
parent
commit
452859f4e1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 11 deletions
  1. +1
    -1
      relapack/src/cgetrf.c
  2. +2
    -3
      relapack/src/dgetrf.c
  3. +1
    -6
      relapack/src/sgetrf.c
  4. +1
    -1
      relapack/src/zgetrf.c

+ 1
- 1
relapack/src/cgetrf.c View File

@@ -22,7 +22,7 @@ void RELAPACK_cgetrf(
*info = -1;
else if (*n < 0)
*info = -2;
else if (*ldA < MAX(1, *n))
else if (*ldA < MAX(1, *m))
*info = -4;
if (*info) {
const blasint minfo = -*info;


+ 2
- 3
relapack/src/dgetrf.c View File

@@ -15,16 +15,15 @@ void RELAPACK_dgetrf(
double *A, const blasint *ldA, blasint *ipiv,
blasint *info
) {

// Check arguments
*info = 0;
if (*m < 0)
*info = -1;
else if (*n < 0)
*info = -2;
else if (*ldA < MAX(1, *n))
else if (*ldA < MAX(1, *m))
*info = -4;
if (*info) {
if (*info!=0) {
const blasint minfo = -*info;
LAPACK(xerbla)("DGETRF", &minfo, strlen("DGETRF"));
return;


+ 1
- 6
relapack/src/sgetrf.c View File

@@ -1,5 +1,4 @@
#include "relapack.h"

static void RELAPACK_sgetrf_rec(const blasint *, const blasint *, float *, const blasint *,
blasint *, blasint *);

@@ -22,16 +21,14 @@ void RELAPACK_sgetrf(
*info = -1;
else if (*n < 0)
*info = -2;
else if (*ldA < MAX(1, *n))
else if (*ldA < MAX(1, *m))
*info = -4;
if (*info) {
const blasint minfo = -*info;
LAPACK(xerbla)("SGETRF", &minfo, strlen("SGETRF"));
return;
}

const blasint sn = MIN(*m, *n);

RELAPACK_sgetrf_rec(m, &sn, A, ldA, ipiv, info);

// Right remainder
@@ -61,7 +58,6 @@ static void RELAPACK_sgetrf_rec(
float *A, const blasint *ldA, blasint *ipiv,
blasint *info
) {

if (*n <= MAX(CROSSOVER_SGETRF, 1)) {
// Unblocked
LAPACK(sgetf2)(m, n, A, ldA, ipiv, info);
@@ -77,7 +73,6 @@ static void RELAPACK_sgetrf_rec(
const blasint n1 = SREC_SPLIT(*n);
const blasint n2 = *n - n1;
const blasint m2 = *m - n1;

// A_L A_R
float *const A_L = A;
float *const A_R = A + *ldA * n1;


+ 1
- 1
relapack/src/zgetrf.c View File

@@ -22,7 +22,7 @@ void RELAPACK_zgetrf(
*info = -1;
else if (*n < 0)
*info = -2;
else if (*ldA < MAX(1, *n))
else if (*ldA < MAX(1, *m))
*info = -4;
if (*info) {
const blasint minfo = -*info;


Loading…
Cancel
Save