Content

BLAS Level 3: r2k

r2k (defined in namespace flens::blas) computes hermitian or symmetric rank \(2k\) operations.

Hermitian Rank \(2k\) Operations

For a hermitian matrix \(C\) and general matrices \(A\) and \(B\) the function computes rank \(2k\) operations

\[ C \leftarrow \beta\,C + \alpha\,A\,B^H + \alpha\,B\,A^H \]

or

\[ C \leftarrow \beta\,C + \alpha\,A^H\,B + \alpha\,B^H\,A. \]

\(C\) is an \(n \times n\) hermitian matrix and \(A\) and \(B\) are \(n \times k\) matrices in the first case and \(k \times n\) matrices in the second case.

trans

(input)
Specifies the operation to be performed as follows

NoTrans

\(C \leftarrow \beta\,C + \alpha\,A\,B^H + \alpha\,B\,A^H\)

Trans

\(C \leftarrow \beta\,C + \alpha\,A^H\,B + \alpha\,B^H\,A\)

A

(input) real or complex valued GeMatrix
Matrix \(A\).

B

(input) real or complex valued GeMatrix
Matrix \(B\).

beta

(input)
Scaling factor \(\beta\). If \(\beta\) is zero and \(C\) has zero rows or columns then \(C\) gets resized.

C

(input/output) complex valued HeMatrix
On entry the original matrix \(C\).
On exit overwritten with \(\beta\,C + \alpha\,A\,B^H + \alpha\,B\,A^H\) or \(\beta\,C + \alpha\,A^H\,B + \alpha\,B^H\,A\).

Symmetric Rank \(2k\) Operations

For a symmetric matrix \(C\) and general matrices \(A\) and \(B\) the function computes rank \(2k\) operations

\[ C \leftarrow \beta\,C + \alpha\,A\,B^T + \alpha\,B\,A^T \]

or

\[ C \leftarrow \beta\,C + \alpha\,A^T\,B + \alpha\,B^T\,A. \]

\(C\) is an \(n \times n\) symmetric matrix and \(A\) and \(B\) are \(n \times k\) matrices in the first case and \(k \times n\) matrices in the second case.

trans

(input)
Specifies the operation to be performed as follows

NoTrans

\(C \leftarrow \beta\,C + \alpha\,A\,B^T + \alpha\,B\,A^T\)

Trans

\(C \leftarrow \beta\,C + \alpha\,A^T\,B + \alpha\,B^T\,A\)

A

(input) real or complex valued GeMatrix
Matrix \(A\).

B

(input) real or complex valued GeMatrix
Matrix \(B\).

beta

(input)
Scaling factor \(\beta\). If \(\beta\) is zero and \(C\) has zero rows or columns then \(C\) gets resized.

C

(input/output) real or complex valued SyMatrix
On entry the original matrix \(C\).
On exit overwritten with \(\beta\,C + \alpha\,A\,B^T + \alpha\,B\,A^T\) or \(\beta\,C + \alpha\,A^T\,B + \alpha\,B^T\,A\).