gesc2#

Functions

void sgesc2(
    const INT           n,
    const f32* restrict A,
    const INT           lda,
          f32* restrict rhs,
    const INT* restrict ipiv,
    const INT* restrict jpiv,
          f32*          scale
);
void sgesc2(const INT n, const f32 *restrict A, const INT lda, f32 *restrict rhs, const INT *restrict ipiv, const INT *restrict jpiv, f32 *scale)#

SGESC2 solves a system of linear equations.

      A * X = scale * RHS
with a general N-by-N matrix A using the LU factorization with complete pivoting computed by SGETC2.

Parameters

in
n

The order of the matrix A. n >= 0.

in
A

The LU part of the factorization of the n-by-n matrix A computed by SGETC2: A = P * L * U * Q Array of dimension (lda, n).

in
lda

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

inout
rhs

On entry, the right hand side vector b. On exit, the solution vector X. Array of dimension n.

in
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix has been interchanged with row ipiv[i]. Array of dimension n, 0-based.

in
jpiv

The pivot indices; for 0 <= j < n, column j of the matrix has been interchanged with column jpiv[j]. Array of dimension n, 0-based.

out
scale

On exit, SCALE contains the scale factor. SCALE is chosen 0 <= SCALE <= 1 to prevent overflow in the solution.

Functions

void dgesc2(
    const INT           n,
    const f64* restrict A,
    const INT           lda,
          f64* restrict rhs,
    const INT* restrict ipiv,
    const INT* restrict jpiv,
          f64*          scale
);
void dgesc2(const INT n, const f64 *restrict A, const INT lda, f64 *restrict rhs, const INT *restrict ipiv, const INT *restrict jpiv, f64 *scale)#

DGESC2 solves a system of linear equations.

      A * X = scale * RHS
with a general N-by-N matrix A using the LU factorization with complete pivoting computed by DGETC2.

Parameters

in
n

The order of the matrix A. n >= 0.

in
A

The LU part of the factorization of the n-by-n matrix A computed by DGETC2: A = P * L * U * Q Array of dimension (lda, n).

in
lda

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

inout
rhs

On entry, the right hand side vector b. On exit, the solution vector X. Array of dimension n.

in
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix has been interchanged with row ipiv[i]. Array of dimension n, 0-based.

in
jpiv

The pivot indices; for 0 <= j < n, column j of the matrix has been interchanged with column jpiv[j]. Array of dimension n, 0-based.

out
scale

On exit, SCALE contains the scale factor. SCALE is chosen 0 <= SCALE <= 1 to prevent overflow in the solution.

Functions

void cgesc2(
    const INT           n,
    const c64* restrict A,
    const INT           lda,
          c64* restrict rhs,
    const INT* restrict ipiv,
    const INT* restrict jpiv,
          f32*          scale
);
void cgesc2(const INT n, const c64 *restrict A, const INT lda, c64 *restrict rhs, const INT *restrict ipiv, const INT *restrict jpiv, f32 *scale)#

CGESC2 solves a system of linear equations.

      A * X = scale * RHS
with a general N-by-N matrix A using the LU factorization with complete pivoting computed by CGETC2.

Parameters

in
n

The number of columns of the matrix A.

in
A

Complex*16 array, dimension (lda, n). On entry, the LU part of the factorization of the n-by-n matrix A computed by CGETC2: A = P * L * U * Q

in
lda

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

inout
rhs

Complex*16 array, dimension n. On entry, the right hand side vector b. On exit, the solution vector X.

in
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix has been interchanged with row ipiv[i]. Array of dimension n, 0-based.

in
jpiv

The pivot indices; for 0 <= j < n, column j of the matrix has been interchanged with column jpiv[j]. Array of dimension n, 0-based.

out
scale

On exit, SCALE contains the scale factor. SCALE is chosen 0 <= SCALE <= 1 to prevent overflow in the solution.

Functions

void zgesc2(
    const INT            n,
    const c128* restrict A,
    const INT            lda,
          c128* restrict rhs,
    const INT*  restrict ipiv,
    const INT*  restrict jpiv,
          f64*           scale
);
void zgesc2(const INT n, const c128 *restrict A, const INT lda, c128 *restrict rhs, const INT *restrict ipiv, const INT *restrict jpiv, f64 *scale)#

ZGESC2 solves a system of linear equations.

      A * X = scale * RHS
with a general N-by-N matrix A using the LU factorization with complete pivoting computed by ZGETC2.

Parameters

in
n

The number of columns of the matrix A.

in
A

Complex*16 array, dimension (lda, n). On entry, the LU part of the factorization of the n-by-n matrix A computed by ZGETC2: A = P * L * U * Q

in
lda

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

inout
rhs

Complex*16 array, dimension n. On entry, the right hand side vector b. On exit, the solution vector X.

in
ipiv

The pivot indices; for 0 <= i < n, row i of the matrix has been interchanged with row ipiv[i]. Array of dimension n, 0-based.

in
jpiv

The pivot indices; for 0 <= j < n, column j of the matrix has been interchanged with column jpiv[j]. Array of dimension n, 0-based.

out
scale

On exit, SCALE contains the scale factor. SCALE is chosen 0 <= SCALE <= 1 to prevent overflow in the solution.