Triangular Matrix-Matrix Solve#

TRSM (TRiangular Solve for Matrix) solves a triangular linear system with multiple right-hand sides:

  • \(op(A) * X = B\), if side = side::left

  • \(X * op(A) = B\), if side = side::right

where:

  • A is the input batched triangular matrix stored in lower or upper mode,

  • B is the batched right-hand side matrix, overwritten by the result X on exit, and

  • Operation op(A) indicates if matrix A is non_transposed, transposed for real data type, or conj_transposed for complex data type.

Note

The TRSM function is temporarily exposed in cuSolverDx library and will be moved to cuBLASDx library in a future release.

cuSolverDx trsm device functions are (see Execution Methods):

__device__ void execute(const data_type* A, data_type* B);
// with runtime leading dimensions
__device__ void execute(const data_type* A, const unsigned int lda,
                              data_type* B);
__device__ void execute(const data_type* A,
                              data_type* B, const unsigned int ldb);
__device__ void execute(const data_type* A, const unsigned int lda,
                              data_type* B, const unsigned int ldb);

If the side is side::left, A is a batched M x M triangular matrix, with leading dimension lda >= M regardless A is in column- or row-major layout; if the side is side::right, A is a batched K x K triangular matrix, with leading dimension lda >= K.

For lower fill mode, only the diagonal and lower triangular part of A is processed, the upper part of the matrix is untouched; for upper fill mode, only the diagonal and upper triangular part of A is processed.

For unit diagonal mode, the diagonal elements of A are unity and are not accessed.

B is a batched M x K righ-hand side matrix. The operation is in-place, i.e. X overwrites B with the same leading dimension ldb. The leading dimension of B is ldb >= K if B is column-major, or ldb >= N if B is row-major.

The functions support:

  • A and B either being the same or different column- or row-major layouts, see Arrangement Operator,

  • \(op(A)\) either being non_transpose, transpose for real data type, or conjugate_transpose for complex data type, see TransposeMode Operator,

  • A being in lower or upper fill mode, see FillMode Operator,

  • side being either side::left or side::right, see Side Operator, and

  • the diagonal elements of A being non_unit or unit, see Diag Operator.