Boost logo

Ublas :

Subject: Re: [ublas] sparse matrix dense matrix multiplication dilemma
From: Ungermann, Jörn (j.ungermann_at_[hidden])
Date: 2011-09-26 02:12:28


Dear Umut,

This is a problem. It depends a bit on the type of the target matrix. I
suppose that to be dense, too.
I proposed a fast product routine last year, but nobody seems to be doing
something about it:
http://lists.boost.org/MailArchives/ublas/2010/03/4091.php
You may have a look at that mail, which contains a product routine, which is
reasonably fast for most involved matrix types. If it isn't, it's probably
not possible to be fast without a priori information.
The proposal contains a series of rather general multiplication kernels,
which are automatically chosen according to the involved types. If you have
problems checking out that code, please send me a direct message.

According to my results from the cited mail, your best bet within
boost::ublas for sparse_row-major_matrix times dense_row-major_matrix to
dense_row-major_matrix would be "sparse_prod".

Before you switch to gm++, please check out also eigen3 and tell me your
experiences after an eventual switch.

Regards,
Joern