Make `general_mat_mul`/`general_mat_vec_mul` more discoverable
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- rust
- Bereich
- data, documentation
Rechercherichtung
Start with the linked general_mat_mul and general_mat_vec_mul documentation in the linalg module, then read the docs for the dot methods and Dot trait. Clarify whether the change should only improve documentation or also add the proposed GeneralDot trait and ArrayBase methods; done means the agreed functionality is discoverable and documented.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The general_mat_mul and general_mat_vec_mul functions are not easy to find, since they're in the linalg module while most other functionality is available either at the top level of the crate or as methods on the array types.
At a minimum, we should mention them in the docs for the dot methods and Dot trait.
However, I think it would also be useful to expose the functionality as methods on ArrayBase. I'd suggest adding a trait like this:
/// General matrix multiplication.
pub trait GeneralDot<A, Rhs1, Rhs2> {
/// Perform general matrix-matrix multiplication, modifying `self` in-place.
///
/// Compute C ← α A B + β C, where `self` is C.
///
/// The array shapes must agree in the way that if `a` is *M* × *N*, then
/// `b` is *N* × *K* and `self` is *M* × *K*.
///
/// ***Panics*** if array shapes are not compatible<br>
/// *Note:* If enabled, uses blas `gemm` for elements of `f32, f64` when memory
/// layout allows. The default matrixmultiply backend is otherwise used for
/// `f32, f64` for all memory layouts.
fn mul_add_scaled_dot_inplace(
&mut self,
beta: A,
alpha: A,
a: &Rhs1,
b: &Rhs2,
);
}
and then add mul_add_scaled_dot_inplace methods which use this trait to ArrayBase<S, Ix1> and ArrayBase<S, Ix2>. What do you think?
- Vorherrschende Sprache
- Rust
- Sterne
- 4.3k
- Forks
- 391
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rust-ndarray/ndarray
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
rust-ndarray/ndarray#1612 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
rust-ndarray/ndarray#1617 · 1 Kommentar ·
-
Stack overflow in `triu` Offenbug good first issue
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
rust-ndarray/ndarray#1615 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
rust-ndarray/ndarray#1610 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
rust-ndarray/ndarray#1609 ·
Alle Issues in rust-ndarray/ndarray
Ähnliche Issues
-
risk:low runtime status:in-progress type:test
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
zeroclaw-labs/zeroclaw#11023 ·
-
good first issue refactor
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
EricSpencer00/Resilient#4835 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
bisq-network/bisq-musig#204 ·
-
agent:ready documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
cesarferreira/stax#890 ·