Boost logo

Ublas :

Subject: Re: [ublas] bindings for gbsv
From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2009-04-10 05:39:34

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).


> 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.


> 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.

> 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).