Re: about mult
Gunter Winkler <[email protected]>
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <[email protected]> |
Chen Shen wrote: > Hi, > > I have a very basic question about MTL. I'm using "mult" to do a > matrix-matrix multiplication. But I noticed that "mult(A, B, C)" is not > giving me "C <- A * B" but "C += A * B". If I used "mult(A, B, C)" more > than once in a program, the result was wrong. I couldn't find any > documentation about mat-mat multiplication. Could you please give me > some hints to solve the problem. What is the correct function I should > use for a mat-mat multiplication? The "correct" behaviour of mult is A += B * C Unfortunatly the documentation does not mention this in all cases. You have to set C to zero manually if you need C <- A * B. 8x--- zero_matrix(C); mult(A,B,C) 8x--- regards Gunter _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/