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
Xon exit, andOperation
op(A)indicates if matrixAisnon_transposed,transposedfor real data type, orconj_transposedfor 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:
AandBeither being the same or different column- or row-major layouts, see Arrangement Operator,\(op(A)\) either being
non_transpose,transposefor real data type, orconjugate_transposefor complex data type, see TransposeMode Operator,Abeing inlowerorupperfill mode, see FillMode Operator,sidebeing eitherside::leftorside::right, see Side Operator, andthe diagonal elements of
Abeingnon_unitorunit, see Diag Operator.