?tbtrs
?tbtrs
Solves a system of linear equations with a band triangular coefficient matrix, with multiple right-hand sides.
Syntax
lapack_int
LAPACKE_stbtrs
(
int
matrix_layout
,
char
uplo
,
char
trans
,
char
diag
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
const
float
*
ab
,
lapack_int
ldab
,
float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_dtbtrs
(
int
matrix_layout
,
char
uplo
,
char
trans
,
char
diag
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
const
double
*
ab
,
lapack_int
ldab
,
double
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_ctbtrs
(
int
matrix_layout
,
char
uplo
,
char
trans
,
char
diag
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
const
lapack_complex_float
*
ab
,
lapack_int
ldab
,
lapack_complex_float
*
b
,
lapack_int
ldb
);
lapack_int
LAPACKE_ztbtrs
(
int
matrix_layout
,
char
uplo
,
char
trans
,
char
diag
,
lapack_int
n
,
lapack_int
kd
,
lapack_int
nrhs
,
const
lapack_complex_double
*
ab
,
lapack_int
ldab
,
lapack_complex_double
*
b
,
lapack_int
ldb
);
Include Files
- mkl.h
Description
The routine solves for
X
the following systems of linear equations with a band triangular matrix A
, with multiple right-hand sides stored in B
:- A*X=B
- iftrans='N',
- AT*X=B
- iftrans='T',
- AH*X=B
- iftrans='C'(for complex matrices only).
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 whetherAis upper or lower triangular:If, thenuplo='U'Ais upper triangular.If, thenuplo='L'Ais lower triangular.
- trans
- Must be'N'or'T'or'C'.If, thentrans='N'is solved forA*X=BX.If, thentrans='T'AT*X=Bis solved forX.If, thentrans='C'AH*X=Bis solved forX.
- diag
- Must be'N'or'U'.If, thendiag='N'Ais not a unit triangular matrix.If, thendiag='U'Ais unit triangular: diagonal elements are assumed to be 1 and not referenced in the arrayab.
- n
- The order ofA; the number of rows inB;n≥0.
- kd
- The number of superdiagonals or subdiagonals in the matrixA;kd≥0.
- nrhs
- The number of right-hand sides;nrhs≥0.
- ab
- The size ofabmust bemax(1,ldab*n)
- b
- The arraycontains the matrixbBwhose columns are the right-hand sides for the systems of equations.The size ofbis max(1,ldb*nrhs) for column major layout and max(1,ldb*n) for row major layout.
- ldab
- The leading dimension ofab;ldab≥kd+ 1.
- ldb
- The leading dimension ofb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
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(n)ε|A|
c
(n
)n
, and ε
is the machine precision. 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
b
is 2
for real flavors and n
*kd
8
for complex flavors.n
*kd
To estimate the condition number (, call
κ
∞
A
)?tbcon
. To estimate the error in the solution, call
?tbrfs
.