BLAS Level 3: mm
mm (defined in namespace flens::blas) computes matrix-matrix products.
General Matrix
For general matrices \(A\), \(B\) and \(C\) the function computes matrix-matrix products of the form
\[ C \leftarrow \beta C + \alpha\,\text{op}(A)\,\text{op}(B) \]
where \(\text{op}(X)\) denotes \(X\), \(X^T\) or \(X^H\).
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsGeMatrix<MA>::value
&& IsGeMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Transpose transA,
Transpose transB,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
transA |
(input) Specifiy \(\text{op}(A)\):
NoTrans |
\(A\) |
Trans |
\(A^T\) |
ConjTrans |
\(A^H\) |
|
transB |
(input) Specifiy \(\text{op}(B)\):
NoTrans |
\(B\) |
Trans |
\(B^T\) |
ConjTrans |
\(B^H\) |
|
alpha |
(input) Scaling factor \(\alpha\). |
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 GeMatrix On entry the original matrix \(C\). On exit overwritten with \(\beta\,C + \alpha\,\text{op}(A)\,\text{op}(B)\). |
Triangular Matrix
For a triangular matrix \(A\) and a general matrices \(B\) the function computes matrix-matrix products of the form
\[ B \leftarrow \alpha\,\text{op}(A)\,B \]
or
\[ B \leftarrow \alpha\,B\,\text{op}(A) \]
where \(\text{op}(X)\) denotes \(X\), \(X^T\) or \(X^H\).
side |
(input) Specify the type of matrix-matrix product:
Left |
\(B \leftarrow \alpha\,\text{op}(A)\,B\) |
Right |
\(B \leftarrow \alpha\,B\,\text{op}(A)\) |
|
transA |
(input) Specifiy \(\text{op}(A)\):
NoTrans |
\(A\) |
Trans |
\(A^T\) |
ConjTrans |
\(A^H\) |
|
alpha |
(input) Scaling factor \(\alpha\). |
A |
(input) real or complex valued GeMatrix Matrix \(A\). |
B |
(input/output) real or complex valued GeMatrix On entry the original matrix \(B\). On exit overwritten with \(\alpha\,\text{op}(A)\,B\) or \(\alpha\,B\,\text{op}(A)\). |
Symmetric Matrix
For a symmetric matrix \(A\) and general matrices \(B\) and \(C\) the function computes matrix-matrix products of the form
\[ C \leftarrow \beta C + \alpha\,A\,B \]
or
\[ C \leftarrow \beta C + \alpha\,B\,A, \]
i.e. the symmetric matrix \(A\) can be multiplies from left or right.
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsSyMatrix<MA>::value
&& IsGeMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Side side,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
side |
(input) Specify the type of matrix-matrix product:
Left |
\(B \leftarrow \beta\,C + \alpha\,A\,B\) |
Right |
\(B \leftarrow \beta\,C + \alpha\,B\,A\) |
|
alpha |
(input) Scaling factor \(\alpha\). |
A |
(input) real or complex valued SyMatrix Symmetric 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 GeMatrix On entry the original matrix \(C\). On exit overwritten with \(\beta\,C + \alpha\,A\,B\) or \(\beta\,C + \alpha\,B\,A\). |
Hermitian Matrix
For a hermitial matrix \(A\) and general matrices \(B\) and \(C\) the function computes matrix-matrix products of the form
\[ C \leftarrow \beta C + \alpha\,A\,B \]
or
\[ C \leftarrow \beta C + \alpha\,B\,A, \]
i.e. the hermitian matrix \(A\) can be multiplies from left or right.
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsHeMatrix<MA>::value
&& IsGeMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Side side,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
side |
(input) Specify the type of matrix-matrix product:
Left |
\(B \leftarrow \beta\,C + \alpha\,A\,B\) |
Right |
\(B \leftarrow \beta\,C + \alpha\,B\,A\) |
|
alpha |
(input) Scaling factor \(\alpha\). |
A |
(input) real or complex valued SyMatrix Symmetric 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 GeMatrix On entry the original matrix \(C\). On exit overwritten with \(\beta\,C + \alpha\,A\,B\) or \(\beta\,C + \alpha\,B\,A\). |
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsGbMatrix<MA>::value
&& IsGeMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Transpose transA,
Transpose transB,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
Defined in namespace flens::blas. Function mm with 5 template parameters.
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsGeMatrix<MA>::value
&& IsGbMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Transpose transA,
Transpose transB,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
Defined in namespace flens::blas. Function mm with 5 template parameters.
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsHbMatrix<MA>::value
&& IsGeMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Side side,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
Defined in namespace flens::blas. Function mm with 5 template parameters.
template <typename ALPHA, typename MA, typename MB, typename BETA, typename MC>
typename RestrictTo<IsSbMatrix<MA>::value
&& IsGeMatrix<MB>::value
&& IsGeMatrix<MC>::value,
void>::Type
mm(Side side,
const ALPHA &alpha,
const MA &A,
const MB &B,
const BETA &beta,
MC &&C);
Defined in namespace flens::blas. Function mm with 5 template parameters.
Defined in namespace flens::blas. Function mm with 3 template parameters.