I have some code that looks like this:
A = randn(5,4,2) B = randn(5,1,1) C = zeros(5,4,1) sum!(C, A .* B) # avoid forming `A.*B` ?
Is there a simple way to avoid forming the intermediate array
A.*B? I was looking into the reducing functions in
Base but I couldn’t find a suitable function for this.
I know I can write a kernel by hand, but if there is something in
Base for this that I’m missing I would like to exploit it.