Developer Reference

Contents

cblas_?sbmv

Computes a matrix-vector product with a symmetric band matrix.

Syntax

void
cblas_ssbmv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
MKL_INT
k
,
const
float
alpha
,
const
float
*a
,
const
MKL_INT
lda
,
const
float
*x
,
const
MKL_INT
incx
,
const
float
beta
,
float
*y
,
const
MKL_INT
incy
);
void
cblas_dsbmv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
MKL_INT
k
,
const
double
alpha
,
const
double
*a
,
const
MKL_INT
lda
,
const
double
*x
,
const
MKL_INT
incx
,
const
double
beta
,
double
*y
,
const
MKL_INT
incy
);
Include Files
  • mkl.h
Description
The
?sbmv
routines perform a matrix-vector operation defined as
y
:=
alpha
*
A
*
x
+
beta
*
y
,
where:
alpha
and
beta
are scalars,
x
and
y
are
n
-element vectors,
A
is an
n
-by-
n
symmetric band matrix, with
k
super-diagonals.
Input Parameters
Layout
Specifies whether two-dimensional array storage is row-major (
CblasRowMajor
) or column-major (
CblasColMajor
).
uplo
Specifies whether the upper or lower triangular part of the band matrix
A
is used:
if
uplo
=
CblasUpper
- upper triangular part;
if
uplo
=
CblasLower
- low triangular part.
n
Specifies the order of the matrix
A
. The value of
n
must be at least zero.
k
Specifies the number of super-diagonals of the matrix
A
.
The value of
k
must satisfy
0
k
.
alpha
Specifies the scalar
alpha
.
a
Array, size
lda
*
n
. Before entry with
uplo
=
CblasUpper
, the leading
(
k
+ 1)
by
n
part of the array
a
must contain the upper triangular band part of the symmetric matrix, 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 the upper triangular part of a symmetric 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
, the leading
(
k
+ 1)
by
n
part of the array
a
must contain the lower triangular band part of the symmetric matrix, 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 the lower triangular part of a symmetric 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]; } }
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 symmetric matrix. 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 symmetric 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 = -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 symmetric matrix, 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 symmetric 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 vector
x
.
incx
Specifies the increment for the elements of
x
.
The value of
incx
must not be zero.
beta
Specifies the scalar
beta
.
y
Array, size at least
(1 + (
n
- 1)*abs(
incy
))
. Before entry, the incremented array
y
must contain the vector
y
.
incy
Specifies the increment for the elements of
y
.
The value of
incy
must not be zero.
Output Parameters
y
Overwritten by the updated vector
y
.

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