4
$\begingroup$

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?

$\endgroup$
4
$\begingroup$

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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