We’ve noticed that the broadcasting assignment operator
.= does a good job in in-place assignment of the LHS in some cases, but not so in others. I suppose
.= is really about broadcasting, and not about in-place updating.
We’re currently experimenting with a macro/julia package that tries to find the best in-place use of
syrk!() etc. using a syntax
@inplace C = A * B @inplace C += A * B @inplace C += alpha * A * B @inplace C *= beta @inplace (C *= beta) += alpha * A * B
to update a matrix/vector
C in-place using the appropriate BLAS calls.
Perhaps someone already implemented such facility, or perhaps people have comments or ideas regarding this.