cblas_?hpr
cblas_?hpr
Performs
a rank-1 update of a Hermitian packed matrix.Syntax
void
cblas_chpr
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
float
alpha
,
const
void
*x
,
const
MKL_INT
incx
,
void
*ap
);
void
cblas_zhpr
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
MKL_INT
n
,
const
double
alpha
,
const
void
*x
,
const
MKL_INT
incx
,
void
*ap
);
Include Files
- mkl.h
Description
The
?hpr
routines perform a matrix-vector operation defined as A := alpha*x*conjg(x') + A,
where:
alpha
is a real scalar,x
is an n
-element vector,A
is an n
-by-n
Hermitian 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, the upper triangular part of the matrixuplo=CblasUpperAis supplied in the packed arrayap.If, 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.incxmust not be zero.
- ap
- Array, size at least((.n*(n+ 1))/2)ForLayout=CblasColMajor:Before entry with, the arrayuplo=CblasUpperapmust contain the upper triangular part of the Hermitian 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 Hermitian 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 Hermitian 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 Hermitian matrix packed sequentially, row-by-row, so thatap[0]containsA1, 1,ap[1]andap[2]containA2, 1andA2, 2respectively, and so on.The imaginary parts of the diagonal elements need not be set and are assumed to be zero.
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=CblasLowerThe imaginary parts of the diagonal elements are set to zero.