JuliaDiff / JuliaDiff/ReverseDiff.jl

Support Base.LinearSlow array types

Open
#29 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
393
Forks
60
Avg merge
18h 24m
Merged PRs (30d)
8

Description

Currently, only array types whose linearindexing trait is LinearFast are supported. With a bit of generalization, we should be able to support LinearSlow arrays as well (like sparse arrays). We'd have to:

  • define getindex(t, args...) on TrackedArray (this is tricky, since we still want to intercept non-scalar/slicing operations, so we'll have to think a bit about Union dispatching)
  • generalize the index field on TrackedReal
  • define linearindexing on TrackedArray as linearindexing(value(t))

...and, of course, add a bunch of tests.

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

Start by locating the existing TrackedArray and TrackedReal implementations and the current LinearFast handling. Read how indexing and the index field are defined, then review the array-related tests before planning coverage for LinearSlow and sparse arrays. Done means the listed generalizations work without breaking scalar, non-scalar, or slicing operations, with tests covering the new array types.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.