开发者

Difference between dtrtrs and dtrsm

开发者 https://www.devze.com 2023-03-16 14:15 出处:网络
I am looking for some triangular solvers, and I have come across two solvers. One in BLAS: dtrsmand another in LAPACK: dtrtrs. From the looks of it both seem to have common functionality, with dtrsm h

I am looking for some triangular solvers, and I have come across two solvers. One in BLAS: dtrsm and another in LAPACK: dtrtrs. From the looks of it both seem to have common functionality, with dtrsm having a little bit more functionality (scaling the right hand side before solving the system).

I would like to know

1) How else do开发者_JAVA百科 these functions differ ?

2) When performing the same operation, which is faster ?

3) If the answer to (2) is not obvious, When is dtrsm suggested over dtrtrs and vice versa ?


  1. Besides scaling, dtrsm can also solve systems in which the triangular matrix is right-multiplied into the unknown matrix (i.e., it can solve XA = B as well as AX = B). On the other hand, dtrsm can silently fail if A is singular, whereas dtrtrs checks for this condition and reports an error.

  2. In a "typical" LAPACK distribution, dtrtrs is just a wrapper that checks for singularity and then calls dtrsm. dtrsm is therefore slightly faster, but that difference is insignificant for matrices of any reasonable size.

0

精彩评论

暂无评论...
验证码 换一张
取 消