Boost logo

Boost Users :

From: jhr.walter_at_[hidden]
Date: 2002-11-12 01:14:16


----- Original Message -----
From: alexei_novakov
To: Boost-Users_at_[hidden]
Sent: Sunday, November 10, 2002 11:29 PM
Subject: [Boost-Users] Re: uBLAS Matrix Multiplication

[snip]

> Here are couple of thoughts:
> 1) matrix-matrix multiplication and matrix-vector multiplication are
> ones of most used operators in matrix computations (especially
> second), if these are not presented

Do you mean in form of operator*()?

> the value of expression framework
> itself becomes questionable.

Which signature would you propose for blocked matrix multiplications (with
additional parameters like block size) then?

> 2) To avoid extra computational compexity temporaries can be used. In
> some cases temporaries are presented in expressions already, like:
> A = B * C;
> Matrix A can be used as temporary.

If you write A.assign (prod (B, C)) in uBLAS, exactly this happens.

> More complex expressions like:
> A = B * C * D;
> will require additional temp matrix.

And a complex ET analysis (maybe even transformation) of the whole
statement.

> 3) To minimize performance penalty template specialization can be
> used. For example:
> matrix_matrix_prod<sparse_matrix_type, sparse_matrix_type> {
> ...
> };
> matrix_matrix_prod<sparse_matrix_type, dence_matrix_type> {
> ...
> };
> etc.

Either etc. is infinite or we'd have to impose assumptions which restrict
programmer's control over uBLAS.

Best regards

Joerg


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net