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 number of columns of the matrix A.

in
A

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

in
lda

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

inout
rhs

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

in
ipiv

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

in
jpiv

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

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 number of columns of the matrix A.

in
A

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

in
lda

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

inout
rhs

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

in
ipiv

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

in
jpiv

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

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 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 array, dimension n. On entry, the right hand side vector b. On exit, the solution vector X.

in
ipiv

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

in
jpiv

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

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

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

in
jpiv

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

out
scale

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