XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ dsyr2k()

void dsyr2k ( char  uplo,
char  trans,
int  n,
int  k,
double  alpha,
int  lda,
double  a[],
int  ldb,
double  b[],
double  beta,
int  ldc,
double  c[] 
)

Rank 2k operation: C <- αABT + αBAT + βC or C <- αATB + αBTA + βC (symmetric matrices) (BLAS 3)

Purpose
This routine performs one of the symmetric rank 2k operations
C <- alpha*A*B^T + alpha*B*A^T + beta*C or C <- alpha*A^T*B + alpha*B^T*A + beta*C
double beta(double a, double b)
Beta function B(a, b)
Definition beta.cpp:79
where alpha and beta are scalars, C is an n x n symmetric matrix and A and B are n x k matrices in the first case and k x n matrices in the second case.
Parameters
[in]uploSpecifies whether the upper or lower triangular part of the array c[][] is to be referenced as follows:
= 'U': Only the upper triangular part of c[][] is to be referenced.
= 'L': Only the lower triangular part of c[][] is to be referenced.
[in]transSpecifies the operation to be performed as follows:
= 'N': C <- alpha*A*B^T + alpha*B*A^T + beta*C.
= 'T' or 'C': C <- alpha*A^T*B + alpha*B^T*A + beta*C.
[in]nOrder of the matrix C. (n >= 0) (If n = 0, returns without computation)
[in]kNumber of columns of the matrices A and B when trans = 'N', or number of rows of the matrices A and B when trans = 'T' or 'C'. (k >= 0)
[in]alphaScalar alpha.
[in]ldaLeading dimension of the two dimensional array a[][]. (lda >= max(1, n) when trans = 'N', lda >= max(1, k) otherwise)
[in]a[][]Array a[la][lda] (la >= k when trans = 'N', la >= n otherwise)
n x k matrix A when trans = 'N', or k x n matrix A otherwise.
[in]ldbLeading dimension of the two dimensional array b[][]. (ldb >= max(1, n) when trans = 'N', ldb >= max(1, k) otherwise)
[in]b[][]Array b[lb][ldb] (lb >= k when trans = 'N', lb >= n otherwise)
n x k matrix B when trans = 'N', or k x n matrix B otherwise.
[in]betaScalar beta.
[in]ldcLeading dimension of the two dimensional array c[][]. (ldc >= max(1, n))
[in,out]c[][]Array c[lc][ldc] (lc >= n)
[in] n x n symmetric matrix C. Only the upper or lower triangular part is to be referenced in accordance with uplo.
[out] n x n output symmetric matrix (= alpha*A*B^T + alpha*B*A^T + beta*C or alpha*A^T*B + alpha*B^T*A + beta*C). Only the upper or lower triangular part is overwritten in accordance with uplo.
Reference
BLAS