Contents

# ?gtsv

Computes the solution to the system of linear equations with a tridiagonal coefficient matrix A and multiple right-hand sides.

## Syntax

Include Files
• mkl.h
Description
The routine solves for
X
the system of linear equations
A*X
=
B
, where
A
is an
n
-by-
n
tridiagonal matrix, the columns of matrix
B
are individual right-hand sides, and the columns of
X
are the corresponding solutions. The routine uses Gaussian elimination with partial pivoting.
Note that the equation
A
T
*X
=
B
may be solved by interchanging the order of the arguments
du
and
dl
.
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
n
The order of
A
, the number of rows in
B
;
n
0.
nrhs
The number of right-hand sides, the number of columns in
B
;
nrhs
0
.
dl
The array
dl
(size
n
- 1) contains the
(
n
- 1)
subdiagonal elements of
A
.
d
The array
d
(size
n
) contains the diagonal elements of
A
.
du
The array
du
(size
n
- 1) contains the
(
n
- 1)
superdiagonal elements of
A
.
b
The array
b
of size max(1,
ldb
*
nrhs
) for column major layout and max(1,
ldb
*
n
) for row major layout
contains the matrix
B
whose columns are the right-hand sides for the systems of equations.
ldb
The leading dimension of
b
;
ldb
max(1,
n
) for column major layout and
ldb
nrhs
for row major layout
.
Output Parameters
dl
Overwritten by the
(
n
-2)
elements of the second superdiagonal of the upper triangular matrix
U
from the
LU
factorization of A. These elements are stored in
dl
, ...,
dl
[
n
- 3]
.
d
Overwritten by the
n
diagonal elements of
U
.
du
Overwritten by the
(
n
-1)
elements of the first superdiagonal of
U
.
b
Overwritten by the solution matrix
X
.
Return Values
This function returns a value
info
.
If
info
= 0
, the execution is successful.
If
info
=
-i
, parameter
i
had an illegal value.
If
info
=
i
,
U
i
,
i
is exactly zero, and the solution has not been computed. The factorization has not been completed unless
i
=
n
.

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.