Boost logo

Ublas :

Subject: Re: [ublas] Trouble with gemv and boost::numeric::bindings::blas
From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2008-12-10 02:36:57


Alex Winbow wrote:
> On Mon, 8 Dec 2008, Rutger ter Borg wrote:
>
>>>> You could try the same with column_major orderings for your matrices,
>>> Tried, makes no difference. I've also tried bounded arrays.
>>> blas::gemm accepts the default row_major ordering just fine.
>
>> You're probably using the function defined in atlas/cblas2.hpp line
>> 95, whereas there is no such function for blas/blas2.hpp. To use it
>> with the blas bindings, you'll have to provide all arguments to gemv,
>> see blas/blas2.hpp lines 26--32.
>
> Ah. I didn't notice that blas/blas2.hpp lines 122-142, which looks
> like the function I want, are commented out. Why is this?
>
> Thanks,
> -Alex

I suppose that is because the blas GEMV subroutine requires the trans
argument. The function commented out sets trans='N'.

So you must write gemv('N', alpha, A, x, beta, y )
instead of gemv( alpha, A, x, beta, y ).

Best,

Karl