On 06/16/2014 06:17 PM, Cameron Zwarich wrote:
On Jun 16, 2014, at 3:03 PM, Cameron Zwarich <[email protected]> wrote:
I stated the right case, but the wrong reason. It’s not for vectorization, it’s 
because it’s not easy to reuse the storage of a matrix while multiplying into 
it.

Overloading Mul for matrix multiplication would be a mistake, since that operator does not act the same way multiplication acts for scalars. I.e. you'd overload it, but passing two matrices into a generic function could do very unexpected things if the code, e.g., relies on the operation being commutative. Additionally, if your matrices contain the size in their type, then some generic code wouldn't even accept them. Matrix scalar multiplication is a better candidate for the Mul overload.

-SL
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to