gesvx#

Functions

void sgesvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
          f32*  restrict A,
    const INT            lda,
          f32*  restrict AF,
    const INT            ldaf,
          INT*  restrict ipiv,
          char*          equed,
          f32*  restrict R,
          f32*  restrict C,
          f32*  restrict B,
    const INT            ldb,
          f32*  restrict X,
    const INT            ldx,
          f32*           rcond,
          f32*  restrict ferr,
          f32*  restrict berr,
          f32*  restrict work,
          INT*  restrict iwork,
          INT*           info
);
void sgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, f32 *restrict A, const INT lda, f32 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f32 *restrict R, f32 *restrict C, f32 *restrict B, const INT ldb, f32 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, f32 *restrict work, INT *restrict iwork, INT *info)#

SGESVX uses the LU factorization to compute the solution to a real system of linear equations A * X = B, where A is an N-by-N matrix and X and B are N-by-NRHS matrices.

Error bounds on the solution and a condition estimate are also provided.

The following steps are performed:

  1. If FACT = “E”, real scaling factors are computed to equilibrate the system: TRANS = ‘N’: diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B TRANS = ‘T’: (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B TRANS = ‘C’: (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B

  2. If FACT = ‘N’ or “E”, the LU decomposition is used to factor the matrix A (after equilibration if FACT = “E”) as A = P * L * U

  3. If some U(i,i)=0, so that U is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A.

  4. The system of equations is solved for X using the factored form of A.

  5. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

  6. If equilibration was used, the matrix X is premultiplied by diag(C) (if TRANS = “N”) or diag(R) (if TRANS = ‘T’ or “C”).

Parameters

in
fact

‘F’: AF and IPIV contain the factored form of A. ‘N’: The matrix A will be copied to AF and factored. ‘E’: The matrix A will be equilibrated if necessary, then copied to AF and factored.

in
trans

‘N’: A * X = B (No transpose) ‘T’: A**T * X = B (Transpose) ‘C’: A**H * X = B (Conjugate transpose = Transpose)

in
n

The number of linear equations (order of A). n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, if equilibration was done, A is scaled. Array of dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

inout
AF

On entry (if fact=’F’), contains the LU factors. On exit, contains the factors L and U. Array of dimension (ldaf, n).

in
ldaf

The leading dimension of AF. ldaf >= max(1, n).

inout
ipiv

Pivot indices from factorization. Array of dimension (n).

inout
equed

On entry (if fact=’F’), specifies equilibration done. On exit, specifies the form of equilibration: ‘N’: No equilibration ‘R’: Row equilibration (A := diag(R) * A) ‘C’: Column equilibration (A := A * diag(C)) ‘B’: Both (A := diag(R) * A * diag(C))

inout
R

Row scale factors. Array of dimension (n).

inout
C

Column scale factors. Array of dimension (n).

inout
B

On entry, the N-by-NRHS right hand side matrix B. On exit, if equilibration was done, B is scaled. Array of dimension (ldb, nrhs).

in
ldb

The leading dimension of B. ldb >= max(1, n).

out
X

The N-by-NRHS solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X. ldx >= max(1, n).

out
rcond

Reciprocal condition number estimate.

out
ferr

Forward error bound for each solution vector. Array of dimension (nrhs).

out
berr

Backward error for each solution vector. Array of dimension (nrhs).

out
work

Workspace array of dimension (4*n). On exit, work[0] contains the reciprocal pivot growth factor.

out
iwork

Integer workspace array of dimension (n).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • > 0: if info = i, U(i,i) is exactly zero (1-based). if info = n+1, U is nonsingular but RCOND < machine precision.

Functions

void dgesvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
          f64*  restrict A,
    const INT            lda,
          f64*  restrict AF,
    const INT            ldaf,
          INT*  restrict ipiv,
          char*          equed,
          f64*  restrict R,
          f64*  restrict C,
          f64*  restrict B,
    const INT            ldb,
          f64*  restrict X,
    const INT            ldx,
          f64*           rcond,
          f64*  restrict ferr,
          f64*  restrict berr,
          f64*  restrict work,
          INT*  restrict iwork,
          INT*           info
);
void dgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, f64 *restrict A, const INT lda, f64 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f64 *restrict R, f64 *restrict C, f64 *restrict B, const INT ldb, f64 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, f64 *restrict work, INT *restrict iwork, INT *info)#

DGESVX uses the LU factorization to compute the solution to a real system of linear equations A * X = B, where A is an N-by-N matrix and X and B are N-by-NRHS matrices.

Error bounds on the solution and a condition estimate are also provided.

The following steps are performed:

  1. If FACT = “E”, real scaling factors are computed to equilibrate the system: TRANS = ‘N’: diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B TRANS = ‘T’: (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B TRANS = ‘C’: (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B

  2. If FACT = ‘N’ or “E”, the LU decomposition is used to factor the matrix A (after equilibration if FACT = “E”) as A = P * L * U

  3. If some U(i,i)=0, so that U is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A.

  4. The system of equations is solved for X using the factored form of A.

  5. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

  6. If equilibration was used, the matrix X is premultiplied by diag(C) (if TRANS = “N”) or diag(R) (if TRANS = ‘T’ or “C”).

Parameters

in
fact

‘F’: AF and IPIV contain the factored form of A. ‘N’: The matrix A will be copied to AF and factored. ‘E’: The matrix A will be equilibrated if necessary, then copied to AF and factored.

in
trans

‘N’: A * X = B (No transpose) ‘T’: A**T * X = B (Transpose) ‘C’: A**H * X = B (Conjugate transpose = Transpose)

in
n

The number of linear equations (order of A). n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, if equilibration was done, A is scaled. Array of dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

inout
AF

On entry (if fact=’F’), contains the LU factors. On exit, contains the factors L and U. Array of dimension (ldaf, n).

in
ldaf

The leading dimension of AF. ldaf >= max(1, n).

inout
ipiv

Pivot indices from factorization. Array of dimension (n).

inout
equed

On entry (if fact=’F’), specifies equilibration done. On exit, specifies the form of equilibration: ‘N’: No equilibration ‘R’: Row equilibration (A := diag(R) * A) ‘C’: Column equilibration (A := A * diag(C)) ‘B’: Both (A := diag(R) * A * diag(C))

inout
R

Row scale factors. Array of dimension (n).

inout
C

Column scale factors. Array of dimension (n).

inout
B

On entry, the N-by-NRHS right hand side matrix B. On exit, if equilibration was done, B is scaled. Array of dimension (ldb, nrhs).

in
ldb

The leading dimension of B. ldb >= max(1, n).

out
X

The N-by-NRHS solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X. ldx >= max(1, n).

out
rcond

Reciprocal condition number estimate.

out
ferr

Forward error bound for each solution vector. Array of dimension (nrhs).

out
berr

Backward error for each solution vector. Array of dimension (nrhs).

out
work

Workspace array of dimension (4*n). On exit, work[0] contains the reciprocal pivot growth factor.

out
iwork

Integer workspace array of dimension (n).

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • > 0: if info = i, U(i,i) is exactly zero (1-based). if info = n+1, U is nonsingular but RCOND < machine precision.

Functions

void cgesvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
          c64*  restrict A,
    const INT            lda,
          c64*  restrict AF,
    const INT            ldaf,
          INT*  restrict ipiv,
          char*          equed,
          f32*  restrict R,
          f32*  restrict C,
          c64*  restrict B,
    const INT            ldb,
          c64*  restrict X,
    const INT            ldx,
          f32*           rcond,
          f32*  restrict ferr,
          f32*  restrict berr,
          c64*  restrict work,
          f32*  restrict rwork,
          INT*           info
);
void cgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, c64 *restrict A, const INT lda, c64 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f32 *restrict R, f32 *restrict C, c64 *restrict B, const INT ldb, c64 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, c64 *restrict work, f32 *restrict rwork, INT *info)#

CGESVX uses the LU factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N matrix and X and B are N-by-NRHS matrices.

Error bounds on the solution and a condition estimate are also provided.

The following steps are performed:

  1. If FACT = “E”, real scaling factors are computed to equilibrate the system: TRANS = ‘N’: diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B TRANS = ‘T’: (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B TRANS = ‘C’: (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B

  2. If FACT = ‘N’ or “E”, the LU decomposition is used to factor the matrix A (after equilibration if FACT = “E”) as A = P * L * U

  3. If some U(i,i)=0, so that U is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A.

  4. The system of equations is solved for X using the factored form of A.

  5. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

  6. If equilibration was used, the matrix X is premultiplied by diag(C) (if TRANS = “N”) or diag(R) (if TRANS = ‘T’ or “C”).

Parameters

in
fact

‘F’: AF and IPIV contain the factored form of A. ‘N’: The matrix A will be copied to AF and factored. ‘E’: The matrix A will be equilibrated if necessary, then copied to AF and factored.

in
trans

‘N’: A * X = B (No transpose) ‘T’: A**T * X = B (Transpose) ‘C’: A**H * X = B (Conjugate transpose)

in
n

The number of linear equations (order of A). n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, if equilibration was done, A is scaled. Array of dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

inout
AF

On entry (if fact=’F’), contains the LU factors. On exit, contains the factors L and U. Array of dimension (ldaf, n).

in
ldaf

The leading dimension of AF. ldaf >= max(1, n).

inout
ipiv

Pivot indices from factorization. Array of dimension (n).

inout
equed

On entry (if fact=’F’), specifies equilibration done. On exit, specifies the form of equilibration: ‘N’: No equilibration ‘R’: Row equilibration (A := diag(R) * A) ‘C’: Column equilibration (A := A * diag(C)) ‘B’: Both (A := diag(R) * A * diag(C))

inout
R

Row scale factors. Array of dimension (n).

inout
C

Column scale factors. Array of dimension (n).

inout
B

On entry, the N-by-NRHS right hand side matrix B. On exit, if equilibration was done, B is scaled. Array of dimension (ldb, nrhs).

in
ldb

The leading dimension of B. ldb >= max(1, n).

out
X

The N-by-NRHS solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X. ldx >= max(1, n).

out
rcond

Reciprocal condition number estimate.

out
ferr

Forward error bound for each solution vector. Array of dimension (nrhs).

out
berr

Backward error for each solution vector. Array of dimension (nrhs).

out
work

Complex workspace array of dimension (2*n).

out
rwork

Real workspace array of dimension (max(1, 2*n)). On exit, rwork[0] contains the reciprocal pivot growth factor.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • > 0: if info = i, U(i,i) is exactly zero (1-based). if info = n+1, U is nonsingular but RCOND < machine precision.

Functions

void zgesvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
          c128* restrict A,
    const INT            lda,
          c128* restrict AF,
    const INT            ldaf,
          INT*  restrict ipiv,
          char*          equed,
          f64*  restrict R,
          f64*  restrict C,
          c128* restrict B,
    const INT            ldb,
          c128* restrict X,
    const INT            ldx,
          f64*           rcond,
          f64*  restrict ferr,
          f64*  restrict berr,
          c128* restrict work,
          f64*  restrict rwork,
          INT*           info
);
void zgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, c128 *restrict A, const INT lda, c128 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f64 *restrict R, f64 *restrict C, c128 *restrict B, const INT ldb, c128 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, c128 *restrict work, f64 *restrict rwork, INT *info)#

ZGESVX uses the LU factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N matrix and X and B are N-by-NRHS matrices.

Error bounds on the solution and a condition estimate are also provided.

The following steps are performed:

  1. If FACT = “E”, real scaling factors are computed to equilibrate the system: TRANS = ‘N’: diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B TRANS = ‘T’: (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B TRANS = ‘C’: (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B

  2. If FACT = ‘N’ or “E”, the LU decomposition is used to factor the matrix A (after equilibration if FACT = “E”) as A = P * L * U

  3. If some U(i,i)=0, so that U is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A.

  4. The system of equations is solved for X using the factored form of A.

  5. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

  6. If equilibration was used, the matrix X is premultiplied by diag(C) (if TRANS = “N”) or diag(R) (if TRANS = ‘T’ or “C”).

Parameters

in
fact

‘F’: AF and IPIV contain the factored form of A. ‘N’: The matrix A will be copied to AF and factored. ‘E’: The matrix A will be equilibrated if necessary, then copied to AF and factored.

in
trans

‘N’: A * X = B (No transpose) ‘T’: A**T * X = B (Transpose) ‘C’: A**H * X = B (Conjugate transpose)

in
n

The number of linear equations (order of A). n >= 0.

in
nrhs

The number of right hand sides. nrhs >= 0.

inout
A

On entry, the N-by-N matrix A. On exit, if equilibration was done, A is scaled. Array of dimension (lda, n).

in
lda

The leading dimension of A. lda >= max(1, n).

inout
AF

On entry (if fact=’F’), contains the LU factors. On exit, contains the factors L and U. Array of dimension (ldaf, n).

in
ldaf

The leading dimension of AF. ldaf >= max(1, n).

inout
ipiv

Pivot indices from factorization. Array of dimension (n).

inout
equed

On entry (if fact=’F’), specifies equilibration done. On exit, specifies the form of equilibration: ‘N’: No equilibration ‘R’: Row equilibration (A := diag(R) * A) ‘C’: Column equilibration (A := A * diag(C)) ‘B’: Both (A := diag(R) * A * diag(C))

inout
R

Row scale factors. Array of dimension (n).

inout
C

Column scale factors. Array of dimension (n).

inout
B

On entry, the N-by-NRHS right hand side matrix B. On exit, if equilibration was done, B is scaled. Array of dimension (ldb, nrhs).

in
ldb

The leading dimension of B. ldb >= max(1, n).

out
X

The N-by-NRHS solution matrix X. Array of dimension (ldx, nrhs).

in
ldx

The leading dimension of X. ldx >= max(1, n).

out
rcond

Reciprocal condition number estimate.

out
ferr

Forward error bound for each solution vector. Array of dimension (nrhs).

out
berr

Backward error for each solution vector. Array of dimension (nrhs).

out
work

Complex workspace array of dimension (2*n).

out
rwork

Real workspace array of dimension (max(1, 2*n)). On exit, rwork[0] contains the reciprocal pivot growth factor.

out
info

  • = 0: successful exit

  • < 0: if info = -i, the i-th argument had an illegal value

  • > 0: if info = i, U(i,i) is exactly zero (1-based). if info = n+1, U is nonsingular but RCOND < machine precision.