diff options
| author | Christoph Groth <christoph.groth@cea.fr> | 2025-12-01 17:29:02 +0100 |
|---|---|---|
| committer | Christoph Groth <christoph.groth@cea.fr> | 2025-12-01 17:29:02 +0100 |
| commit | c087e1860fc1ec8faf65bc5a9af86733066577cf (patch) | |
| tree | 4b60fd816bbe7e59bcd2622e3528ab3280b2b588 /src/main.rs | |
| parent | 4613cb09543f053a44b0c0afb711e50b16f3cf07 (diff) | |
Use clearer generic dimension types
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 655c906..be0571d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,10 +4,11 @@ use mdarray::{view, tensor, Slice, Dim, Const, expr::Expression}; use mdarray as md; // Indexing convention: C_ij <- A_ik * B_kj -fn matmul<D0: Dim, D1: Dim, D2: Dim>( - a: &Slice<f64, (D0, D1)>, - b: &Slice<f64, (D1, D2)>, - c: &mut Slice<f64, (D0, D2)>) { +fn matmul<DI: Dim, DK: Dim, DJ: Dim>( + a: &Slice<f64, (DI, DK)>, + b: &Slice<f64, (DK, DJ)>, + c: &mut Slice<f64, (DI, DJ)>, +) { for (mut ci, ai) in c.rows_mut().zip(a.rows()) { for (aik, bk) in ai.zip(b.rows()) { for (cij, bkj) in ci.expr_mut().zip(bk) { |
