See the discussion https://github.com/JuliaLang/julia/issues/249 and the code in https://github.com/simonbyrne/InplaceOps.jl.
Personally, I like to use the BLAS like way if writing the multiplication in optimized code. Hopefully, we can soon get rid of the `A` and `B` part of `A_mul_B!` such that it would only be `mul!` and I'd also like if we adopt the BLAS convention completely and add scalar arguments to the matrix multiplication functions. 2014-11-13 6:11 GMT-05:00 David van Leeuwen <[email protected]>: > On a related note, > > On Tuesday, October 21, 2014 10:20:25 PM UTC+2, Stefan Karpinski wrote: >> >> On Tue, Oct 21, 2014 at 4:13 PM, David van Leeuwen <[email protected] >> > wrote: >> >>> Does anybody know if `a' * b` is translated to a single BLAS call with >>> the correct transposition options set, or that this is translated to a >>> transposition followed by a BLAS call? >> >> >> Yes, `a' * b` is parsed specially and calls the wonderfully named >> Ac_mul_B function, which calls BLAS without doing an explicit conjugate >> transpose. We would like to change this by making (conjugate) transpose >> lazy so that both version use the same BLAS call. >> > > I am now at the point where I get a lot of efficiency out of in-place > multiplication > by triangular matrix. Julia uses BLAS.trmm! in > > A_mul_B!(x, triangular) > > which is great. Is there any chance Julia will learn to substitute > A_mul_B!() when using the syntax > > x = x * triangular > > or, what I like even more but gets a bit hairy for matrices, > > x *= triangular > > ? > > Cheers, > > ---david >
