Boost logo

Ublas :

From: choon (teochoonhui_at_[hidden])
Date: 2007-09-30 12:14:38


Hi,

I have a application where the sparse matrix M is of dimensions row=2x10^4,
col=1.4x10^6 and the number of nonzero is around 10^6. In this application,
I need to do (, for a few thousands of iterations,) v2 := v1*M, where v2 is
a sparse vector of length col, and v1 is a dense vector of length row.

When v2 is a dense vector, the speed of matrix-vector multiplication done by
axpy_prod(v1,M,v2) is pretty fast, otherwise, the multiplication took a
really long time. I really need v2 to be sparse vector as my application
keeps many such v2 for some reasons. So, if v2's are dense, the memory will
blow up very quickly...

FYI, I also tried the following with v2 as sparse vector, but the speed were
about as slow:
1) noalias(v2) = prod(v1,M)
2) noalias(v2) = prod(trans(M),v1)

Hope you guys can help me with this.

Thank you very much in advance,
choon

-- 
View this message in context: http://www.nabble.com/Any-efficient-way-to-do-sparse-matrix-vector-multiplication--tf4543944.html#a12967229
Sent from the Boost - uBLAS mailing list archive at Nabble.com.