
Ublas : 
From: Gunter Winkler (guwi17_at_[hidden])
Date: 20061206 03:41:03
On Wednesday 06 December 2006 05:10, Seabook wrote:
> There are some data about normal/sparse/symmetry matrix.
> Debug(ms)Release(msec)
> Sparse 139094 46390
> Symmetry 139094 46390
> Normal 2578 1329
> The efficiency are really terrible?!
> Did I forget something ? (such as declare or method of prod or assign data
> )
Reading your code I noticed that you do matrixmatrixmultiplications. It is
no surprise that multiplication of full sparse matrices is much slower than
multiplication of dense matrices, because the latter can be extremely
optimized. The sparse algorithm wins over dense if the number of nonzeroes
per row is small compared to the size. Although the overall times is quite
high. On the other hand the orientation (row major vs. column major) is very
important for sparse products
Please try these operations and report the times.
compressed_matrix<float, column_major> * compressed_matrix<float,
column_major>
compressed_matrix<float, column_major> * matrix<float, column_major>
compressed_matrix<float, column_major> * matrix<float, row_major>
compressed_matrix<float, column_major> * symmetric_matrix<float, column_major>
compressed_matrix<float, column_major> * symmetric_matrix<float, row_major>
please check whether C=prod(A,B) or axpy_prod(A,B,X,true) is faster.
PS: you initialize sy1 twice (and do nothing with sy2)
mfg
Gunter