----- Original Message ----- From: alexei_novakov To: Boost-Users@yahoogroups.com 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
{ ... }; matrix_matrix_prod { ... }; etc.
Either etc. is infinite or we'd have to impose assumptions which restrict programmer's control over uBLAS. Best regards Joerg