Subject: Re: [ublas] [bindinds] Problem with lapack::gbtrf
From: Karl Meerbergen (Karl.Meerbergen_at_[hidden])
Date: 2010-07-27 03:03:54
Marco Guazzone wrote:
> 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.
>> 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.
> 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.
> -- Marco
> ublas mailing list
> Sent to: karl.meerbergen_at_[hidden]
The reason is that the ublas row_major format corresponds best to the
lapack column major format. Note that they are not the same band formats!