cblas_?spr2
cblas_?spr2
Computes a rank-2 update of a symmetric packed matrix.
Syntax
void
cblas_sspr2
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
float
alpha
,
const
float
*x
,
const
MKL_INT
incx
,
const
float
*y
,
const
MKL_INT
incy
,
float
*ap
);
void
cblas_dspr2
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
double
alpha
,
const
double
*x
,
const
MKL_INT
incx
,
const
double
*y
,
const
MKL_INT
incy
,
double
*ap
);
Include Files
- mkl.h
Description
The
?spr2
routines perform a matrix-vector operation defined as A:= alpha*x*y'+ alpha*y*x' + A,
where:
alpha
is a scalar,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.
- 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.
- 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.
- 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