cblas_?spr
cblas_?spr
Performs a rank-1 update of a symmetric packed matrix.
Syntax
void
cblas_sspr
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
float
alpha
,
const
float
*x
,
const
MKL_INT
incx
,
float
*ap
);
void
cblas_dspr
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
double
alpha
,
const
double
*x
,
const
MKL_INT
incx
,
double
*ap
);
Include Files
- mkl.h
Description
The
?spr
routines perform a matrix-vector operation defined as a:= alpha*x*x'+ A,
where:
alpha
is a real scalar,x
is an n
-element vector,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.
- 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.
- ap
- ForLayout=CblasColMajor:Before entry with, the arrayuplo=CblasUpperapmust contain the upper triangular part of the symmetric matrix packed sequentially, column-by-column, so thatcontainsap[0]A1, 1,andap[1]containap[2]A1, 2andA2, 2respectively, and so on.Before entry with, the arrayuplo=CblasLowerapmust contain the lower triangular part of the symmetric matrix packed sequentially, column-by-column, so thatcontainsap[0]A1, 1,andap[1]containap[2]A2, 1andA3, 1respectively, and so on.ForLayout=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.
Output Parameters
- ap
- With, overwritten by the upper triangular part of the updated matrix.uplo=CblasUpperWith, overwritten by the lower triangular part of the updated matrix.uplo=CblasLower