fn
strsm
void strsm(bool upper, bool unit_diag, int M, int N, const float * A, int lda, float * B, int ldb)Single-precision triangular solve with a matrix right-hand side (TRSM).
Overwrites with , where is an
triangular matrix on the left and is , both row-major.
Only the triangle named by upper is read; unit_diag treats the
diagonal as ones without reading it. Dispatches to Accelerate's
cblas_strsm with side Left, no transpose and .
Math
For upper , back substitution:
References
Accelerate.framework cblas_strsm.
Parameters
upperboolWhether is upper (back substitution) or lower (forward substitution) triangular.
unit_ diagboolTreat the diagonal of as all ones.
M, Nint, .
Aconst float*Row-major triangular matrix buffer.
ldaintLeading dimension (row stride) of .
Bfloat*Row-major right-hand sides, replaced by the solution.
ldbintLeading dimension (row stride) of .
Notes
No singularity check. An exactly-zero diagonal entry divides by zero,
so the solution carries the IEEE result (, or NaN for
) — the reference framework's answer for a singular triangle.
LAPACK's ?trtrs driver checks the diagonal first and reports
info > 0 without solving; that is the difference that matters here.