gtsvx#

Functions

void sgtsvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
    const f32*  restrict DL,
    const f32*  restrict D,
    const f32*  restrict DU,
          f32*  restrict DLF,
          f32*  restrict DF,
          f32*  restrict DUF,
          f32*  restrict DU2,
          INT*  restrict ipiv,
    const 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 sgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const f32 *restrict DL, const f32 *restrict D, const f32 *restrict DU, f32 *restrict DLF, f32 *restrict DF, f32 *restrict DUF, f32 *restrict DU2, INT *restrict ipiv, const 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)#

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

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

Parameters

in
fact

Specifies whether the factored form of A has been supplied. = ‘F’: DLF, DF, DUF, DU2, and IPIV contain the factored form. = ‘N’: The matrix will be copied and factored.

in
trans

Specifies the form of the system of equations: = ‘N’: A * X = B (No transpose) = ‘T’: A**T * X = B (Transpose) = ‘C’: A**H * X = B (Conjugate transpose = Transpose)

in
n

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

in
nrhs

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

in
DL

The (n-1) subdiagonal elements of A. Array of dimension (n-1).

in
D

The diagonal elements of A. Array of dimension (n).

in
DU

The (n-1) superdiagonal elements of A. Array of dimension (n-1).

inout
DLF

If fact = “F”, the (n-1) multipliers from LU factorization. If fact = “N”, output. Array of dimension (n-1).

inout
DF

If fact = “F”, the n diagonal elements of U. If fact = “N”, output. Array of dimension (n).

inout
DUF

If fact = “F”, the (n-1) elements of first superdiagonal of U. If fact = “N”, output. Array of dimension (n-1).

inout
DU2

If fact = “F”, the (n-2) elements of second superdiagonal of U. If fact = “N”, output. Array of dimension (n-2).

inout
ipiv

If fact = “F”, the pivot indices from factorization. If fact = “N”, output. Array of dimension (n).

in
B

The N-by-NRHS right hand side matrix. Array of dimension (ldb, nrhs).

in
ldb

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

out
X

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

in
ldx

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

out
rcond

The reciprocal condition number estimate.

out
ferr

Forward error bounds 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 (3*n).

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 (i <= n), U(i,i) is exactly zero

  • = n+1: U is nonsingular, but rcond < machine precision

Functions

void dgtsvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
    const f64*  restrict DL,
    const f64*  restrict D,
    const f64*  restrict DU,
          f64*  restrict DLF,
          f64*  restrict DF,
          f64*  restrict DUF,
          f64*  restrict DU2,
          INT*  restrict ipiv,
    const 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 dgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const f64 *restrict DL, const f64 *restrict D, const f64 *restrict DU, f64 *restrict DLF, f64 *restrict DF, f64 *restrict DUF, f64 *restrict DU2, INT *restrict ipiv, const 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)#

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

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

Parameters

in
fact

Specifies whether the factored form of A has been supplied. = ‘F’: DLF, DF, DUF, DU2, and IPIV contain the factored form. = ‘N’: The matrix will be copied and factored.

in
trans

Specifies the form of the system of equations: = ‘N’: A * X = B (No transpose) = ‘T’: A**T * X = B (Transpose) = ‘C’: A**H * X = B (Conjugate transpose = Transpose)

in
n

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

in
nrhs

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

in
DL

The (n-1) subdiagonal elements of A. Array of dimension (n-1).

in
D

The diagonal elements of A. Array of dimension (n).

in
DU

The (n-1) superdiagonal elements of A. Array of dimension (n-1).

inout
DLF

If fact = “F”, the (n-1) multipliers from LU factorization. If fact = “N”, output. Array of dimension (n-1).

inout
DF

If fact = “F”, the n diagonal elements of U. If fact = “N”, output. Array of dimension (n).

inout
DUF

If fact = “F”, the (n-1) elements of first superdiagonal of U. If fact = “N”, output. Array of dimension (n-1).

inout
DU2

If fact = “F”, the (n-2) elements of second superdiagonal of U. If fact = “N”, output. Array of dimension (n-2).

inout
ipiv

If fact = “F”, the pivot indices from factorization. If fact = “N”, output. Array of dimension (n).

in
B

The N-by-NRHS right hand side matrix. Array of dimension (ldb, nrhs).

in
ldb

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

out
X

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

in
ldx

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

out
rcond

The reciprocal condition number estimate.

out
ferr

Forward error bounds 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 (3*n).

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 (i <= n), U(i,i) is exactly zero

  • = n+1: U is nonsingular, but rcond < machine precision

Functions

void cgtsvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
    const c64*  restrict DL,
    const c64*  restrict D,
    const c64*  restrict DU,
          c64*  restrict DLF,
          c64*  restrict DF,
          c64*  restrict DUF,
          c64*  restrict DU2,
          INT*  restrict ipiv,
    const 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 cgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const c64 *restrict DL, const c64 *restrict D, const c64 *restrict DU, c64 *restrict DLF, c64 *restrict DF, c64 *restrict DUF, c64 *restrict DU2, INT *restrict ipiv, const 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)#

CGTSVX uses the LU factorization to compute the solution to a complex system of linear equations A * X = B, A**T * X = B, or A**H * X = B, where A is a tridiagonal matrix of order N and X and B are N-by-NRHS matrices.

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

Parameters

in
fact

Specifies whether the factored form of A has been supplied. = ‘F’: DLF, DF, DUF, DU2, and IPIV contain the factored form. = ‘N’: The matrix will be copied and factored.

in
trans

Specifies the form of the system of equations: = ‘N’: A * X = B (No transpose) = ‘T’: A**T * X = B (Transpose) = ‘C’: A**H * X = B (Conjugate transpose)

in
n

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

in
nrhs

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

in
DL

The (n-1) subdiagonal elements of A. Array of dimension (n-1).

in
D

The diagonal elements of A. Array of dimension (n).

in
DU

The (n-1) superdiagonal elements of A. Array of dimension (n-1).

inout
DLF

If fact = “F”, the (n-1) multipliers from LU factorization. If fact = “N”, output. Array of dimension (n-1).

inout
DF

If fact = “F”, the n diagonal elements of U. If fact = “N”, output. Array of dimension (n).

inout
DUF

If fact = “F”, the (n-1) elements of first superdiagonal of U. If fact = “N”, output. Array of dimension (n-1).

inout
DU2

If fact = “F”, the (n-2) elements of second superdiagonal of U. If fact = “N”, output. Array of dimension (n-2).

inout
ipiv

If fact = “F”, the pivot indices from factorization. If fact = “N”, output. Array of dimension (n).

in
B

The N-by-NRHS right hand side matrix. Array of dimension (ldb, nrhs).

in
ldb

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

out
X

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

in
ldx

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

out
rcond

The reciprocal condition number estimate.

out
ferr

Forward error bounds 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 (2*n).

out
rwork

Real 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 (i <= n), U(i,i) is exactly zero

  • = n+1: U is nonsingular, but rcond < machine precision

Functions

void zgtsvx(
    const char*          fact,
    const char*          trans,
    const INT            n,
    const INT            nrhs,
    const c128* restrict DL,
    const c128* restrict D,
    const c128* restrict DU,
          c128* restrict DLF,
          c128* restrict DF,
          c128* restrict DUF,
          c128* restrict DU2,
          INT*  restrict ipiv,
    const 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 zgtsvx(const char *fact, const char *trans, const INT n, const INT nrhs, const c128 *restrict DL, const c128 *restrict D, const c128 *restrict DU, c128 *restrict DLF, c128 *restrict DF, c128 *restrict DUF, c128 *restrict DU2, INT *restrict ipiv, const 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)#

ZGTSVX uses the LU factorization to compute the solution to a complex system of linear equations A * X = B, A**T * X = B, or A**H * X = B, where A is a tridiagonal matrix of order N and X and B are N-by-NRHS matrices.

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

Parameters

in
fact

Specifies whether the factored form of A has been supplied. = ‘F’: DLF, DF, DUF, DU2, and IPIV contain the factored form. = ‘N’: The matrix will be copied and factored.

in
trans

Specifies the form of the system of equations: = ‘N’: A * X = B (No transpose) = ‘T’: A**T * X = B (Transpose) = ‘C’: A**H * X = B (Conjugate transpose)

in
n

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

in
nrhs

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

in
DL

The (n-1) subdiagonal elements of A. Array of dimension (n-1).

in
D

The diagonal elements of A. Array of dimension (n).

in
DU

The (n-1) superdiagonal elements of A. Array of dimension (n-1).

inout
DLF

If fact = “F”, the (n-1) multipliers from LU factorization. If fact = “N”, output. Array of dimension (n-1).

inout
DF

If fact = “F”, the n diagonal elements of U. If fact = “N”, output. Array of dimension (n).

inout
DUF

If fact = “F”, the (n-1) elements of first superdiagonal of U. If fact = “N”, output. Array of dimension (n-1).

inout
DU2

If fact = “F”, the (n-2) elements of second superdiagonal of U. If fact = “N”, output. Array of dimension (n-2).

inout
ipiv

If fact = “F”, the pivot indices from factorization. If fact = “N”, output. Array of dimension (n).

in
B

The N-by-NRHS right hand side matrix. Array of dimension (ldb, nrhs).

in
ldb

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

out
X

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

in
ldx

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

out
rcond

The reciprocal condition number estimate.

out
ferr

Forward error bounds 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 (2*n).

out
rwork

Real 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 (i <= n), U(i,i) is exactly zero

  • = n+1: U is nonsingular, but rcond < machine precision