Re: [BLAS bindings] help appreciated on using trmv and gbmv

Florent Teichteil <[email protected]>
Newsgroups gmane.comp.lib.boost.ublas
Message-ID <[email protected]>
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
> [email protected]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: [email protected]
_______________________________________________
ublas mailing list
[email protected]
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.