Make `general_mat_mul`/`general_mat_vec_mul` more discoverable
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- rust
- Domaine
- data, documentation
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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?
- Langage dominant
- Rust
- Étoiles
- 4.3k
- Forks
- 391
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rust-ndarray/ndarray
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
rust-ndarray/ndarray#1612 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
rust-ndarray/ndarray#1617 · 1 commentaire ·
-
Stack overflow in `triu` Ouvertebug good first issue
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
rust-ndarray/ndarray#1615 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
rust-ndarray/ndarray#1610 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
rust-ndarray/ndarray#1609 ·
Toutes les issues de rust-ndarray/ndarray
Issues similaires
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Ouvertebug CLI custom-model
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
Missing examples for `Allocator` OuverteA-allocators A-docs C-enhancement T-libs
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100