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

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?

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.

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