|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-11-03 05:20:26
Am Freitag, 3. November 2006 08:45 schrieb liu chang:
> dense matrix * sparse vector
>
> To my surprise, the first operation is about 50 times faster than the
> second, with g++ -O3. It seems that ublas isn't able to take full
> advantage of the sparseness in sv (dv is empty regardless of dm).
Yes, there is no specialization of the matrix vector product for this
combination. You find all implementations in functional.hpp line 806
(struct matrix_vector_prod1).
Currently ublas recognizes these combinations:
any * dense,
banded * sparse, sparse * banded, sparse * sparse.
for "dense*sparse" the dispatcher should choose the "Packed sparse
case", but this doesn't seem to work.
mfg
Gunter