Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-07-19 04:25:48


Hallo,

I wrote a (rather quick & dirty) implementation of major and minor iterators
for a compressed matrix. The performance of a quite gerenal implementation of
axpy_prod was improved dramatically.

axpy_prod 1: general implementation of y += A x using new iterators
axpy_prod 2: general implementation of y += A x using old iterators
axpy_prod 3: optimized version from operation.hpp (faster is impossible ;)

$ g++-4.1 -I $HOME/include -o sparse_iter sparse_iter.cpp -DNDEBUG -O2
$ ./sparse_iter 1000
size 1002001
axpy_prod_it: 0.51 sec.
axpy_prod (generic row major): 1.38 sec.
axpy_prod (optimized): 0.34 sec.

$ g++-3.4 -I $HOME/include -o sparse_iter sparse_iter.cpp -DNDEBUG -O2
$ ./sparse_iter 1000
size 1002001
axpy_prod_it: 0.52 sec.
axpy_prod (generic row major): 1.2 sec.
axpy_prod (optimized): 0.34 sec.

I will put links to the sources on the wiki in a few minutes.
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?UBLAS_Matrix_Iterators

mfg
Gunter