JuliaSparse / SuiteSparseGraphBLAS.jl

Sparse, General Linear Algebra for Graphs!
MIT License
102 stars 17 forks source link

Dot broadcasting with = should accumulate better. #41

Closed rayegun closed 3 years ago

rayegun commented 3 years ago

This probably won't make it into 1.0. Something like A .+= B * C should lower to something like mul!(A, B, C; accum=+). This is difficult to do since * doesn't have an in-place form, and I'd need to map every such symbol to its functional form or do exact specification of broadcast rules (which might be better). In the meantime broadcasts will be a convenient syntax, but in-place broadcasting will be slow.

rayegun commented 3 years ago

Closing for now. Accumulate now works for elementwise operations. It cannot easily be made to work with * given that it is eager. Unfortunate but not a big deal.