cblas_?syr2k
cblas_?syr2k
Performs a symmetric rank-2k update.
Syntax
void
cblas_ssyr2k
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
n
,
const
MKL_INT
k
,
const
float
alpha
,
const
float
*a
,
const
MKL_INT
lda
,
const
float
*b
,
const
MKL_INT
ldb
,
const
float
beta
,
float
*c
,
const
MKL_INT
ldc
);
void
cblas_dsyr2k
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
n
,
const
MKL_INT
k
,
const
double
alpha
,
const
double
*a
,
const
MKL_INT
lda
,
const
double
*b
,
const
MKL_INT
ldb
,
const
double
beta
,
double
*c
,
const
MKL_INT
ldc
);
void
cblas_csyr2k
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
n
,
const
MKL_INT
k
,
const
void
*alpha
,
const
void
*a
,
const
MKL_INT
lda
,
const
void
*b
,
const
MKL_INT
ldb
,
const
void
*beta
,
void
*c
,
const
MKL_INT
ldc
);
void
cblas_zsyr2k
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_UPLO
uplo
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
n
,
const
MKL_INT
k
,
const
void
*alpha
,
const
void
*a
,
const
MKL_INT
lda
,
const
void
*b
,
const
MKL_INT
ldb
,
const
void
*beta
,
void
*c
,
const
MKL_INT
ldc
);
Include Files
- mkl.h
Description
The
?syr2k
routines perform a rank-2k matrix-matrix operation for a symmetric matrix
C
using general matrices A
and B
The
operation is defined as:C := alpha*A*B' + alpha*B*A' + beta*C,
or
C := alpha*A'*B + alpha*B'*A + beta*C,
where:
alpha
and beta
are scalars,C
is an n
-by-n
symmetric matrix,A
and B
are n
-by-k
matrices in the first case, and k
-by-n
matrices in the second case.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 arraycis used.If, then the upper triangular part of the arrayuplo=CblasUppercis used.If, then the low triangular part of the arrayuplo=CblasLowercis used.
- trans
- Specifies the operation:iftrans=CblasNoTrans, then;C:=alpha*A*B'+alpha*B*A'+beta*Ciftrans=CblasTrans, then;C:=alpha*A'*B+alpha*B'*A+beta*Ciftrans=CblasConjTrans, then.C:=alpha*A'*B+alpha*B'*A+beta*C
- n
- Specifies the order of the matrixThe value ofC.nmust be at least zero.
- k
- On entry withtrans=CblasNoTrans,kspecifies the number of columns of the matricesAandB, and on entry withtrans=CblasTransortrans=CblasConjTrans,The value ofkspecifies the number of rows of the matricesAandB.kmust be at least zero.
- alpha
- Specifies the scalaralpha.
- a
- trans=CblasNoTranstrans=CblasConjTransLayout=CblasColMajorArray, sizelda*k.Before entry, the leadingn-by-kpart of the arrayamust contain the matrixA.Array, sizelda*n.Before entry, the leadingk-by-npart of the arrayamust contain the matrixA.Layout=CblasRowMajorArray, sizelda*n.Before entry, the leadingk-by-npart of the arrayamust contain the matrixA.Array, sizelda*k.Before entry, the leadingn-by-kpart of the arrayamust contain the matrixA.
- lda
- Specifies the leading dimension ofaas declared in the calling (sub)program.trans=CblasNoTranstrans=CblasConjTransLayout=CblasColMajorldamust be at leastmax(1,.n)ldamust be at leastmax(1,k)Layout=CblasRowMajorldamust be at leastmax(1,k)ldamust be at leastmax(1,.n)
- b
- trans=CblasNoTranstrans=CblasConjTransLayout=CblasColMajorArray, sizeldb*k.Before entry, the leadingn-by-kpart of the arraybmust contain the matrixB.Array, sizeldb*n.Before entry, the leadingk-by-npart of the arraybmust contain the matrixB.Layout=CblasRowMajorArray, sizelda*n.Before entry, the leadingk-by-npart of the arraybmust contain the matrixB.Array, sizelda*k.Before entry, the leadingn-by-kpart of the arraybmust contain the matrixB.
- ldb
- Specifies the leading dimension ofaas declared in the calling (sub)program.trans=CblasNoTranstrans=CblasConjTransLayout=CblasColMajorldbmust be at leastmax(1,.n)ldbmust be at leastmax(1,k)Layout=CblasRowMajorldbmust be at leastmax(1,k)ldbmust be at leastmax(1,.n)
- beta
- Specifies the scalarbeta.
- c
- Array, sizeldc*n. Before entry withuplo=CblasUpper, the leadingn-by-nupper triangular part of the arraycmust contain the upper triangular part of the symmetric matrix and the strictly lower triangular part ofcis not referenced.Before entry withuplo=CblasLower, the leadingn-by-nlower triangular part of the arraycmust contain the lower triangular part of the symmetric matrix and the strictly upper triangular part ofcis not referenced.
- ldc
- Specifies the leading dimension ofcas declared in the calling (sub)program. The value ofldcmust be at leastmax(1,.n)
Output Parameters
- c
- Withuplo=CblasUpper, the upper triangular part of the arraycis overwritten by the upper triangular part of the updated matrix.Withuplo=CblasLower, the lower triangular part of the arraycis overwritten by the lower triangular part of the updated matrix.