I would really like this too and have looked through base but haven't found 
anything. For example, the gemm_wrapper 
<https://github.com/JuliaLang/julia/blob/8f4d5868e17b4ac40e09d58f96ec91d0f8a001df/base/linalg/matmul.jl#L304>
 hardcodes 
alpha = 1 and beta = 0. What I want it for is to extend Simon's nice 
package InplaceOps.jl <https://github.com/simonbyrne/InplaceOps.jl> to not 
only support @into! A = B * C but also accumulation like @into! A += alpha 
* B * C. However, since there is no A_mul_B with multipliers I need to go 
straight for the Blas calls and basically implement the whole A_mul_B 
dispatch all over again.

I guess it would be possible to go through base and add optional alpha and 
beta parameters to whatever A_mul_B methods that could support it...


On Monday, September 14, 2015 at 8:28:07 PM UTC+2, Douglas Bates wrote:
>
> I want to perform an operation like the BLAS.gemm! operation with 
> multipliers α and β but for my own custom matrix type.  The name gemm! is 
> unsuitable because the ge part indicates general matrices.  I can, of 
> course, choose my own name for the generic but I thought I would ask if 
> there was already a name for such an operation.
>
> In more detail, the BLAS.gemm! function returns the target, C, as C := 
>  α*A*B + β*C where α and β are scalars. (You can also specify transpose or 
> not on A and/or B). The most common case is C := A*B, corresponding to  α = 
> 1 and  β = 0 but other cases are possible and often convenient.
>
>
>

Reply via email to