[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Vector-Matrix Multiplication
From: |
Dimitris K. |
Subject: |
Re: [Help-gsl] Vector-Matrix Multiplication |
Date: |
Tue, 30 Oct 2012 15:57:08 +0200 |
Indeed, I should have guessed that BLAS cannot distinguish between
row/column vectors.
Which means you are right, I can use A^T op() to get the same effect.
A^T * x^T = (x * A) ^T
x^T = x
(x * A)^T = x * A
so A^T * x = x * A
Thanks a lot!
On Tue, Oct 30, 2012 at 3:45 PM, Michael Lehn <address@hidden>wrote:
> Am 30.10.2012 um 14:35 schrieb Dimitris K.:
>
> For clarification, since I can't find anything in the docs, I want to ask.
>
>
> Say I want to compute the following:
>
>
> y = \alpha x op(A) + \beta y (where x,y are vectors and A is a matrix),
>
>
>
> So if op(A)=A your vectors are row-rectors. In this case the operation is
> equivalent to
>
> y = \alpha A^T x + \beta y
>
> where x and y are column-vectors. Other cases of op(A) can be treated
> analogously.
>
> As BLAS does not distinguish between col- and row-vectors you just can
> use gemv.
>
> If elements are complex valued there is a problem though. Officially
> gemv in BLAS does not support an operation like
>
> y = \alpha conj(A) x + \beta y
>
> which would be required in your case if op(A)=A^H. However, (I think)
> some BLAS implementation actually support it (TRANSA='R').
>
> Cheers,
>
> Michael
>
--
alkar