Boost logo

Ublas :

Subject: Re: [ublas] [bindinds] Problem with lapack::gbtrf
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2010-07-26 16:17:56


On Mon, Jul 26, 2010 at 12:37 AM, Thomas Klimpel
<Thomas.Klimpel_at_[hidden]> wrote:
> Marco Guazzone wrote:
>> Please, can you help me?
>
> Right now, the best thing to find out how to use lapack::gbtrf is to look at libs/numeric/bindings/lapack/test/ublas_gbsv.cpp.
>
[cut]
>
> So the first thing to learn is that "ublas::column_major" is not right in case of a banded matrix. The second thing is that "kl+ku" (or "l+u") must be written instead of "ku" (or "u"), because the pivoting used during the factorization slightly enlarges the bandwidth of the matrix.
>

Thomas,

I really thank you. I can confirm you that it works.

However it is very strange that for column-major banded matrix the
code even fails to compile.
Specifically, I've noticed that what fails is the following assertion
(gbtrf.hpp - line 121):

   BOOST_STATIC_ASSERT( (bindings::is_column_major< MatrixAB >::value) );

This is strange to me since the macro requires that MatrixAB has a
column-major layout; however it actually fails if MatrixAB has really
a column-major layout and pass if it has not.

Is it ok?

Note: I ask this since this is quite confusing to me because I thought
LAPACK used to work with column-major matrices.

Thanks!

Cheers,

-- Marco