You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a trait to tie together compile-time and runtime number of dimensions (#1575)
This is the next PR to address #1506. In the previous PR (#1568) we
established a trait for capturing the "dimensionality" or "rank" of an
array at the type level. This PR is focused on providing a bridge from
type-level dimensionality to runtime dimensionality, which we do through
the new `Ranked` trait.
The `Ranked` trait is pretty simple: require an associated type (`NDim`)
that carries compile-time dimensionality, and a function `fn ndim(&self)
-> usize` that tells the user runtime dimensionality. The
`src/layout/ranked.rs` file contains the definition, implementations,
and blanket implementations.
This commit also does some moves and renames of the existing
`Dimensionality` trait, renaming it to `Rank`, as well as many of
the types in that file.
0 commit comments