Contents

# cblas_?tbsv

Solves a system of linear equations whose coefficients are in a triangular band matrix.

## Syntax

Include Files
• mkl.h
Description
The
?tbsv
routines solve one of the following systems of equations:
A
*
x
=
b
, or
A
'*
x
=
b
, or conjg(
A
')*
x
=
b
,
where:
b
and
x
are
n
-element vectors,
A
is an
n
-by-
n
unit, or non-unit, upper or lower triangular band matrix, with
(
k
+ 1)
diagonals.
The routine does not test for singularity or near-singularity.
Such tests must be performed before calling this routine.
Input Parameters
Layout
Specifies whether two-dimensional array storage is row-major (
CblasRowMajor
) or column-major (
CblasColMajor
).
uplo
Specifies whether the matrix
A
is an upper or lower triangular matrix:
if
uplo
=
CblasUpper
the matrix is upper triangular;
if
uplo
=
CblasLower
, the matrix is low triangular.
trans
Specifies the system of equations:
if
trans
=
CblasNoTrans
, then
A
*
x
=
b
;
if
trans
=
CblasTrans
, then
A
'*
x
=
b
;
if
trans
=
CblasConjTrans
, then
conjg(
A
')*
x
=
b
.
diag
Specifies whether the matrix
A
is unit triangular:
if
diag
=
CblasUnit
then the matrix is unit triangular;
if
diag
=
CblasNonUnit
, then the matrix is not unit triangular.
n
Specifies the order of the matrix
A
. The value of
n
must be at least zero.
k
On entry with
uplo
=
CblasUpper
,
k
specifies the number of super-diagonals of the matrix
A
. On entry with
uplo
=
CblasLower
,
k
specifies the number of sub-diagonals of the matrix
A
.
The value of
k
must satisfy
0
k
.
a
Array, size
lda
*
n
.
Layout
=
CblasColMajor
:
Before entry with
uplo
=
CblasUpper
(
k
+ 1)
by
n
part of the array
a
must contain the upper triangular band part of the matrix of coefficients, supplied column-by-column,
with the leading diagonal of the matrix in row
k
of the array, the first super-diagonal starting at position 1 in row
(
k
- 1)
, and so on.
The top left
k
by
k
triangle of the array
a
is not referenced.
The following program segment transfers an upper triangular band matrix from conventional full matrix storage (
matrix
, with leading dimension
ldm
) to band storage (
a
, with leading dimension
lda
):
```for (j = 0; j < n; j++) {
m = k - j;
for (i = max( 0, j - k); i <= j; i++) {
a[(m+i) + j*lda] = matrix[i + j*ldm];
}
}
```
Before entry with
uplo
=
CblasLower
(
k
+ 1)
by
n
part of the array
a
must contain the lower triangular band part of the matrix of coefficients, supplied column-by-column,
with the leading diagonal of the matrix in row 0 of the array, the first sub-diagonal starting at position 0 in row 1
, and so on. The bottom right
k
by
k
triangle of the array
a
is not referenced.
The following program segment transfers a lower triangular band matrix from conventional full matrix storage (
matrix
, with leading dimension
ldm
) to band storage (
a
, with leading dimension
lda
):
```for (j = 0; j < n; j++) {
m = -j;
for (i = j; i < min(n, j + k + 1); i++) {
a[(m+i) + j*lda] = matrix[i + j*ldm];
}
}```
When
diag
=
CblasUnit
, the elements of the array
a
corresponding to the diagonal elements of the matrix are not referenced, but are assumed to be unity.
Layout = CblasRowMajor:
Before entry with
uplo
=
CblasUpper
, the leading (
k
+ 1)-by-
n
part of array
a
must contain the upper triangular band part of the matrix of coefficients. The matrix must be supplied row-by-row, with the leading diagonal of the matrix in column 0 of the array, the first super-diagonal starting at position 0 in column 1, and so on. The bottom right
k
-by-
k
triangle of array
a
is not referenced.
The following program segment transfers the upper triangular part of a Hermitian band matrix from row-major full matrix storage (
matrix
ldm
) to row-major band storage (
a
, with leading dimension
lda
):
```for (i = 0; i < n; i++) {
m = -i;
for (j = i; j < MIN(n, i+k+1); j++) {
a[(m+j) + i*lda] = matrix[j + i*ldm];
}
}
```
Before entry with
uplo
=
CblasLower
, the leading (
k
+ 1)-by-
n
part of array
a
must contain the lower triangular band part of the matrix of coefficients, supplied row-by-row, with the leading diagonal of the matrix in column
k
of the array, the first sub-diagonal starting at position 1 in column
k
-1, and so on. The top left
k
-by-
k
triangle of array
a
is not referenced.
The following program segment transfers the lower triangular part of a Hermitian row-major band matrix from row-major full matrix storage (
matrix
, with leading dimension
ldm
) to row-major band storage (
a
, with leading dimension
lda
):
```for (i = 0; i < n; i++) {
m = k - i;
for (j = max(0, i-k); j <= i; j++) {
a[(m+j) + i*lda] = matrix[j + i*ldm];
}
}```
lda
Specifies the leading dimension of
a
as declared in the calling (sub)program. The value of
lda
must be at least
(
k
+ 1)
.
x
Array, size at least
(1 + (
n
- 1)*abs(
incx
))
. Before entry, the incremented array
x
must contain the
n
-element right-hand side vector
b
.
incx
Specifies the increment for the elements of
x
.
The value of
incx
must not be zero.
Output Parameters
x
Overwritten with the solution vector
x
.

#### Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804