Fixes and follow-ups to two-sided broadcasting in arithmethic ops

Aperta
#936 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
data

Direzione di ricerca

Start by reviewing the two-sided broadcasting changes in issue #898 and the arithmetic-operation code they introduced. Work through each unchecked follow-up—trait bounds, allocation preservation for Array + Array, and a possible public broadcasting API—and confirm the relevant behavior and API decisions before considering the issue complete.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In #898 we left the following "known issues" open that we can fix after that PR's review and merge:

  • Rename BroadcastShape to DimMax - we also move the broadcast method out of the trait (it can just be a free function)
  • It is a wish that the D: Dimension + DimMax<E> bound in arith ops becomes just D: Dimension, i.e. the DimMax with associated type becomes implied by D: Dimension. At this point it is not certain how this can be done.
  • Preserve the allocation of the input array in arithmetic ops in more cases (when only the left/right side needs broadcast) in array + &array and &array + array
  • Preserve the allocation of the input array in arithmetic ops in more cases (when the left side needs broadcast in Array + Array)
  • Improve performance of "no-broadcasting-needed" scenario in &array + &array operation
  • Potentially provide public function or method similar to broadcast_with - that does the broadcasting of two arrays together.
Lingua principale
Rust
Stelle
4.3k
Fork
391
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-ndarray/ndarray

Tutte le issue di rust-ndarray/ndarray

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.