SLATE 2024.05.31
Software for Linear Algebra Targeting Exascale
Loading...
Searching...
No Matches
trmm: Triangular matrix multiply

\(B = \alpha A B\) or \(B = \alpha B A\) where \(A\) is triangular More...

Functions

template<typename scalar_t >
void slate::trmm (blas::Side side, scalar_t alpha, TriangularMatrix< scalar_t > &A, Matrix< scalar_t > &B, Options const &opts)
 Distributed parallel triangular matrix-matrix multiplication.
 

Detailed Description

\(B = \alpha A B\) or \(B = \alpha B A\) where \(A\) is triangular

Function Documentation

◆ trmm()

template<typename scalar_t >
void slate::trmm ( blas::Side  side,
scalar_t  alpha,
TriangularMatrix< scalar_t > &  A,
Matrix< scalar_t > &  B,
Options const &  opts 
)

Distributed parallel triangular matrix-matrix multiplication.

Performs one of the triangular matrix-matrix operations

\[ B = \alpha A B, \]

or

\[ B = \alpha B A, \]

where alpha is a scalar, B is an m-by-n matrix and A is a unit or non-unit, upper or lower triangular matrix. The matrices can be transposed or conjugate-transposed beforehand, e.g.,

auto AT = slate::transpose( A );
slate::trmm( Side::Left, alpha, AT, B );

Complexity (in real): \(m^{2} n\) flops.

Template Parameters
scalar_tOne of float, double, std::complex<float>, std::complex<double>.
Parameters
[in]sideWhether A appears on the left or on the right of B:
  • Side::Left: \(B = \alpha A B\)
  • Side::Right: \(B = \alpha B A\)
[in]alphaThe scalar alpha.
[in]A
  • If side = left, the m-by-m triangular matrix A;
  • if side = right, the n-by-n triangular matrix A.
[in,out]BOn entry, the m-by-n matrix B. On exit, overwritten by the result \(\alpha A B\) or \(\alpha B A\).
[in]optsAdditional options, as map of name = value pairs. Possible options:
  • Option::Lookahead: Number of blocks to overlap communication and computation. lookahead >= 0. Default 1.
  • Option::Target: Implementation to target. Possible values:
    • HostTask: OpenMP tasks on CPU host [default].
    • HostNest: nested OpenMP parallel for loop on CPU host.
    • HostBatch: batched BLAS on CPU host.
    • Devices: batched BLAS on GPU device.