JuliaArrays / JuliaArrays/BlockArrays.jl

Overload dot

Open
#389 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
254
Forks
39
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing how dot dispatches for BlockArray and AbstractArray, then review the relevant block-wise operation code. Done means clarifying the dispatch rationale and defining the specialized behavior needed for block arrays, including support for non-indexable subarrays.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.