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 resultX
on exit, andOperation
op(A)
indicates if matrixA
isnon_transposed
,transposed
for real data type, orconj_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
andB
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, orconjugate_transpose
for complex data type, see TransposeMode Operator,A
being inlower
orupper
fill mode, see FillMode Operator,side
being eitherside::left
orside::right
, see Side Operator, andthe diagonal elements of
A
beingnon_unit
orunit
, see Diag Operator.