How to do transpose for trtrs (or tptrs) in blas?

I want to solve:

XA = B

But it seems that trtrs only lets me solve:

AX = B

Or, using the 'transpose' flag, in trtrs:

A'X = B

which, rearranging is:

(A'X)' = B'
X'A = B'

So, I can use it to solve XA = B, but I have to first transpose B manually myself, and then, again, transpose the answer. Am I missing some trick to avoid having to do the two manual transposes?

Note that I've read through solve $xA=b$ for $x$ using LAPACK and BLAS , but it doesn't seem to explain how to avoid the two manual transposes, as far as I can tell? Or maybe I'm missing something somehow?


1 Answer 1


Since basically all that xTRTRS does is call xTRSM (from BLAS), why not just call that directly? xTRSM contains a SIDE parameter which lets you specify exactly what you want.

  • $\begingroup$ Awesome! That's the information I was looking for :-) $\endgroup$ Jun 18, 2013 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.