Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overload dot #389

Open
JordiManyer opened this issue Apr 12, 2024 · 3 comments
Open

Overload dot #389

JordiManyer opened this issue Apr 12, 2024 · 3 comments

Comments

@JordiManyer
Copy link

JordiManyer commented Apr 12, 2024

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

@JordiManyer JordiManyer changed the title Behaviour of block indexing Behaviour of block linear algebra Apr 12, 2024
@dlfivefifty
Copy link
Member

It just hasn't been overloaded yet?

@dlfivefifty dlfivefifty changed the title Behaviour of block linear algebra Overload dot Apr 12, 2024
@dlfivefifty
Copy link
Member

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants