cblas_?spmv
cblas_?spmv
Computes a matrix-vector product with a symmetric packed matrix.
Syntax
void
cblas_sspmv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
float
alpha
,
const
float
*ap
,
const
float
*x
,
const
MKL_INT
incx
,
const
float
beta
,
float
*y
,
const
MKL_INT
incy
);
void
cblas_dspmv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
double
alpha
,
const
double
*ap
,
const
double
*x
,
const
MKL_INT
incx
,
const
double
beta
,
double
*y
,
const
MKL_INT
incy
);
Include Files
- mkl.h
Description
The
?spmv
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 matrix, supplied in packed form.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 matrixAis supplied in the packed arrayap.If, then the upper triangular part of the matrixuplo=CblasUpperAis supplied in the packed arrayap.If, then the low triangular part of the matrixuplo=CblasLowerAis supplied in the packed arrayap.
- n
- Specifies the order of the matrixA. The value ofnmust be at least zero.
- alpha
- Specifies the scalaralpha.
- ap
- Array, size at least((n*(n + 1))/2).ForLayout=CblasColMajor:Before entry with, the arrayuplo=CblasUpperapmust contain the upper triangular part of the symmetric matrix packed sequentially, column-by-column, so thatrespectively, and so on. Before entry withcontainsap[0]A1, 1,andap[1]containap[2]A1, 2andA2, 2, the arrayuplo=CblasLowerapmust contain the lower triangular part of the symmetric matrix packed sequentially, column-by-column, so thatrespectively, and so on.containsap[0]A1, 1,andap[1]containap[2]A2, 1andA3, 1ForLayout=CblasRowMajor:Before entry withuplo=CblasUpper, the arrayapmust contain the upper triangular part of the symmetric matrix packed sequentially, row-by-row,ap[0]containsA1, 1,ap[1]andap[2]containA1, 2andA1, 3respectively, and so on. Before entry withuplo=CblasLower, the arrayapmust contain the lower triangular part of the symmetric matrix packed sequentially, row-by-row, so thatap[0]containsA1, 1,ap[1]andap[2]containA2, 1andA2, 2respectively, and so on.
- x
- Array, size at least(1 + (. Before entry, the incremented arrayn- 1)*abs(incx))xmust contain then-element vectorx.
- incx
- Specifies the increment for the elements ofx.The value ofincxmust not be zero.
- beta
- Specifies the scalarbeta.Whenbetais supplied as zero, thenyneed not be set on input.
- y
- Array, size at least(1 + (. Before entry, the incremented arrayn- 1)*abs(incy))ymust contain then-element vectory.
- incy
- Specifies the increment for the elements ofy.The value ofincymust not be zero.
Output Parameters
- y
- Overwritten by the updated vectory.