?gbtrs
?gbtrs
Solves a system of linear equations with an LU-factored band coefficient matrix, with multiple right-hand sides.
Syntax
lapack_int
LAPACKE_sgbtrs
(
int
matrix_layout
,
char
trans
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
const
float
*
ab
,
lapack_int
ldab
,
const
lapack_int
*
ipiv
,
float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_dgbtrs
(
int
matrix_layout
,
char
trans
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
const
double
*
ab
,
lapack_int
ldab
,
const
lapack_int
*
ipiv
,
double
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_cgbtrs
(
int
matrix_layout
,
char
trans
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
const
lapack_complex_float
*
ab
,
lapack_int
ldab
,
const
lapack_int
*
ipiv
,
lapack_complex_float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_zgbtrs
(
int
matrix_layout
,
char
trans
,
lapack_int
n
,
lapack_int
kl
,
lapack_int
ku
,
lapack_int
nrhs
,
const
lapack_complex_double
*
ab
,
lapack_int
ldab
,
const
lapack_int
*
ipiv
,
lapack_complex_double
*
b
,
lapack_int
ldb
);
Include Files
- mkl.h
Description
The routine solves for
X
the following systems of linear equations:- A*X=B
- iftrans='N',
- AT*X=B
- iftrans='T',
- AH*X=B
- iftrans='C'(for complex matrices only).
Here
A
is an LU
-factored general band matrix of order n
with kl
non-zero subdiagonals and ku
nonzero superdiagonals. Before calling this routine, call ?gbtrf
to compute the LU
factorization of A
.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- trans
- Must be'N'or'T'or'C'.
- 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;nrhs≥0.
- ab
- Arraysize max(1,abldab*n)
- b
- Arraybsize max(1,ldb*nrhs) for column major layout and max(1,ldb*n) for row major layout.The arraybcontains the matrixBwhose columns are the right-hand sides for the systems of equations.
- ldab
- The leading dimension of the arrayab;ldab≥2*kl+ku+1.
- ldb
- The leading dimension ofb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
- ipiv
Output Parameters
- 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.Application Notes
For each right-hand side
b
, the computed solution is the exact solution of a perturbed system of equations (
, where A
+ E
)x
= b
|E| ≤ c(kl + ku + 1)ε P|L||U|
c
(k
)k
, and ε
If is the true solution, the computed solution
x
0
x
satisfies this error bound:
where / || || = (
cond(
= || |A
,x
)A
-1
||A
| |x
| ||∞
x
||∞
≤
||A
-1
||∞
A
||∞
κ
∞
A
).Note that (; the condition number of and might or might not be equal to (.
cond(
can be much smaller than A
,x
)κ
∞
A
)A
T
A
H
κ
∞
A
)The approximate number of floating-point operations for one right-hand side vector is 2
n
(ku
+ 2kl
) for real flavors. The number of operations for complex flavors is 4 times greater. All these estimates assume that kl
and ku
are much less than min(m
,n
).To estimate the condition number (, call
κ
∞
A
)?gbcon
. To refine the solution and estimate the error, call
?gbrfs
.