?pbsv
?pbsv
Computes the solution to the system of linear equations with a symmetric or Hermitian positive-definite band coefficient matrix A and multiple right-hand sides.
Syntax
lapack_int
LAPACKE_spbsv
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
float
*
ab
,
lapack_int
ldab
,
float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_dpbsv
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
double
*
ab
,
lapack_int
ldab
,
double
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_cpbsv
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
lapack_complex_float
*
ab
,
lapack_int
ldab
,
lapack_complex_float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_zpbsv
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
lapack_complex_double
*
ab
,
lapack_int
ldab
,
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 band matrix, the columns of matrix B
are individual right-hand sides, and the columns of X
are the corresponding solutions.The Cholesky decomposition is used to factor
A
as A
= U
T
*U
(real flavors) and A
= U
H
*U
(complex flavors), if uplo
= 'U'
or (real flavors) and (complex flavors), if ,
A
= L*L
T
A
= L*L
H
uplo
= 'L'
where .
U
is an upper triangular band matrix and L
is a lower triangular band matrix, with the same number of superdiagonals or subdiagonals as A
. The factored form of 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).
- uplo
- Must be'U'or'L'.Indicates whether the upper or lower triangular part ofAis stored:If, the upper triangle ofuplo='U'Ais stored.If, the lower triangle ofuplo='L'Ais stored.
- n
- The order of matrixA;n≥0.
- kd
- The number of superdiagonals of the matrixAif, or the number of subdiagonals ifuplo='U'uplo='L';kd≥0.
- nrhs
- The number of right-hand sides, the number of columns in.B;nrhs≥0
- ab,b
- Arrays:ab(size max(1,,ldab*n))bof size max(1,. The arrayldb*nrhs) for column major layout and max(1,ldb*n) for row major layoutabcontains the upper or the lower triangular part of the matrixA(as specified byuplo) in band storage (see Matrix Storage Schemes).The arraybcontains the matrixBwhose columns are the right-hand sides for the systems of equations.
- ldab
- The leading dimension of the arrayab;ldab≥kd+1.
- ldb
- The leading dimension ofb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
Output Parameters
- ab
- The upper or lower triangular part ofA(in band storage) is overwritten by the Cholesky factorUorL, as specified byuplo, in the same storage format asA.
- 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, so the factorization could not be completed, and the solution has not been computed.