|
Ublas : |
Subject: Re: [ublas] bindings for gbsv
From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2009-04-10 09:47:00
Thomas Klimpel wrote:
> Karl Meerbergen wrote:
>
>> The bindings for gbtrf state that the banded matrix should be row_major.
>> This is surprising since all LAPACK routines should take column major
>> matrices (with implicitly assumed transposition row_major can be allowed).
>>
>
> indeed.
>
>
>
>> I suppose the reason for this is that the ublas banded matrices are not
>> compatible with the lapack storage format. Ublas matrices should be
>> passed in row_major format to be interpreted as column major by lapack.
>>
>
> exactly.
>
>
>
>> The traits specialization for ublas should thus take a row_major matrix,
>> but interpret it as a column_major matrix. This would solve this strange
>> situation.
>>
>
> I see. You want to write the bindings for GLAS without inheriting this misbehavior. I can understand that.
>
Smart guy ;-)
>
>
>> Any thoughts?
>>
>
> It's easy to fix. In line 57-59 of ublas_banded.hpp:
>
> typedef typename detail::ublas_ordering<
> typename F::orientation_category
> >::type ordering_type;
>
> has to be replaced with
>
>
> typedef typename detail::ublas_banded_ordering<
> typename F::orientation_category
> >::type ordering_type;
>
> and detail::ublas_banded_ordering has to be adjusted accordingly.
>
>
> I think we should do this (I would do it if you agree).
>
I agree.
Karl
>
> Regards,
> Thomas
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>