Boost logo

Ublas :

Subject: Re: [ublas] [BLAS bindings] help appreciated on using trmv and gbmv
From: Florent Teichteil (florent.teichteil_at_[hidden])
Date: 2012-10-10 03:38:02


Hi Rutger,
Thanks a lot for the time you devote to my questions. I really try to
make things work, but I have still troubles with banded matrices:

> 1) you don't clear the banded matrix B, in my case M != B. If you do
> that, the routines using the packed banded storage start to work.
> blas::gbmv assumes packed storage.

Indeed, if I clear B before filling it, I get correct results with row
major storage, but not with column major. Am I doing something wrong?
Moreover, I thought that banded matrices only store data within the
bands, so I don't understand why I have to clear B before filling only
the bands.

>
> 2) The banded adaptor of the dense matrix doesn't work with blas::gbmv
> because the memory model isn't compatible. Maybe we can apply a trick to
> the memory model, such as passing a* = begin_value(A)-kl and lda += 1?
> We would need to check that. Until then, it is not supported.

This is the more confusing part. The bindings for triangular matrices
work only with triangular adaptors of dense matrices (not with
triangular matrices), but the bindings for banded matrices work only
with banded matrices (not with banded adaptors of dense matrices).
Moreover, depending on the context, incompatible bindings silently
compile or don't compile. At the end, as an end-user of the API, it is
quite difficult to distinguish safe operations from insane ones. Perhaps
some doxygen comments in the code would help programmers know what is
allowed or not?

Best,
Florent

>
> Regards,
>
> Rutger
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: florent.teichteil_at_[hidden]