JuliaArrays / BlockArrays.jl

BlockArrays for Julia
http://juliaarrays.github.io/BlockArrays.jl/
Other
192 stars 26 forks source link

Overload dot #389

Open JordiManyer opened 3 months ago

JordiManyer commented 3 months ago

Hi all,

I believe block-wise linear algebra operations such as dot default to the implementation for AbstractArray instead of doing the operation block by block and then adding the results. This is highly inefficient since searching for the block index every single time. I would understand this behavior for mixed arrays, but I think there should be specialized implementations for operations between block-arrays. Also, this limits BlockArray to contain sub-arrays that are indexable. This is quite a heavy restriction, since there might be objects implementing the whole LinearAlgebra API without being indexable (for instance, parallel arrays).

In summary, I would like someone to explain the though process behind why these choices have been made instead of leveraging the block-wise structure of BlockArray.

Thanks, Jordi

dlfivefifty commented 3 months ago

It just hasn't been overloaded yet?

dlfivefifty commented 3 months ago

I think it's more helpful to list exactly what functions are not specialised. You mentioned dot are there others you need?

The most likely way these will be fixed is if you submit a PR.

JordiManyer commented 3 months ago

Great! Ill try to make a list and sumit a PR (hopefully next week).