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 \times M\) triangular matrix, with leading dimension \(\mathrm{lda} \geq M\) regardless A is in column- or row-major layout; if the side is side::right, A is a batched \(N \times N\) triangular matrix, with leading dimension \(\mathrm{lda} \geq N\).

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 \times N\) right-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 \(\mathrm{ldb} \geq M\) if B is column-major, or \(\mathrm{ldb} \geq N\) if B is row-major.

The functions support:

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

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

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

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

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