?ptsv
?ptsv
Computes the solution to the system of linear equations with a symmetric or Hermitian positive definite tridiagonal coefficient matrix A and multiple right-hand sides.
Syntax
lapack_int LAPACKE_sptsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
nrhs
,
float*
d
,
float*
e
,
float*
b
,
lapack_int
ldb
);
lapack_int LAPACKE_dptsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
nrhs
,
double*
d
,
double*
e
,
double*
b
,
lapack_int
ldb
);
lapack_int LAPACKE_cptsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
nrhs
,
float*
d
,
lapack_complex_float*
e
,
lapack_complex_float*
b
,
lapack_int
ldb
);
lapack_int LAPACKE_zptsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
nrhs
,
double*
d
,
lapack_complex_double*
e
,
lapack_complex_double*
b
,
lapack_int
ldb
);
Include Files
- mkl.h
Description
The routine solves for , where
X
the real or complex system of linear equations A*X
= B
A
is an n
-by-n
symmetric/Hermitian positive-definite tridiagonal matrix, the columns of matrix B
are individual right-hand sides, and the columns of X
are the corresponding solutions.A
is factored as A
= L*D*L
T
A
= L*D*L
H
A
is then used to solve the system of equations A*X
= B
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 matrixA;n≥0.
- nrhs
- The number of right-hand sides, the number of columns in.B;nrhs≥0
- d
- Array, dimension at leastmax(1,. Contains the diagonal elements of the tridiagonal matrixn)A.
- e,b
- Arrays:e(sizen- 1),bof size max(1,. The arrayldb*nrhs) for column major layout and max(1,ldb*n) for row major layoutecontains the(subdiagonal elements ofn- 1)A.The arraybcontains the matrixBwhose columns are the right-hand sides for the systems of equations.
- ldb
- The leading dimension ofb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
Output Parameters
- d
- Overwritten by thendiagonal elements of the diagonal matrixDfrom the(real)/L*D*LT(complex) factorization ofL*D*LHA.
- e
- Overwritten by the(subdiagonal elements of the unit bidiagonal factorn- 1)Lfrom the factorization ofA.
- b
- Overwritten by the solution matrixX.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , parameter
info
= -i
i
had an illegal value. If , the leading minor of order .
info
= i
i
(and therefore the matrix A
itself) is not positive-definite, and the solution has not been computed. The factorization has not been completed unless i
= n