?gbsv
?gbsv
Computes the solution to the system of linear equations with a band coefficient matrix A and multiple right-hand sides.
Syntax
lapack_int
LAPACKE_sgbsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
float
*
ab
,
lapack_int
ldab
,
lapack_int
*
ipiv
,
float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_dgbsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
double
*
ab
,
lapack_int
ldab
,
lapack_int
*
ipiv
,
double
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_cgbsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
lapack_complex_float
*
ab
,
lapack_int
ldab
,
lapack_int
*
ipiv
,
lapack_complex_float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_zgbsv
(
int
matrix_layout
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
lapack_complex_double
*
ab
,
lapack_int
ldab
,
lapack_int
*
ipiv
,
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
band matrix with kl
subdiagonals and ku
superdiagonals, the columns of matrix B
are individual right-hand sides, and the columns of X
are the corresponding solutions.The .
LU
decomposition with partial pivoting and row interchanges is used to factor A
as A
= L*U
, where L
is a product of permutation and unit lower triangular matrices with kl
subdiagonals, and U
is upper triangular with kl
+ku
superdiagonals. 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).
- n
- The order ofA. The number of rows inB;n≥0.
- kl
- The number of subdiagonals within the band ofA;kl≥0.
- ku
- The number of superdiagonals within the band ofA;ku≥0.
- nrhs
- The number of right-hand sides. The number of columns inB;nrhs≥0.
- ab,b
- Arrays:ab(size max(1,,ldab*n))bof size max(1,.ldb*nrhs) for column major layout and max(1,ldb*n) for row major layoutThe arraybcontains the matrixBwhose columns are the right-hand sides for the systems of equations.
- ldab
- The leading dimension of the arrayab. (ldab≥2kl+ku+1)
- ldb
- The leading dimension ofb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
Output Parameters
- ab
- Overwritten byLandU.Uis stored as an upper triangular band matrix withkl+kusuperdiagonals andLis stored as a lower triangular band matrix withklsubdiagonals. See Matrix Storage Schemes.
- b
- Overwritten by the solution matrixX.
- ipiv
- Array, size at leastmax(1,. The pivot indices: rown)iwas interchanged with row.ipiv[i-1]
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , parameter
info
= -i
i
had an illegal value. If , is exactly zero. The factorization has been completed, but the factor
info
= i
U
i
, i
U
is exactly singular, so the solution could not be computed.