Macro extent

Source
macro_rules! extent {
    ( $( $label:ident = $size:expr_2021 ),* $(,)? ) => { ... };
}
Expand description

Construct a new extent with the given set of dimension-size pairs.

let s = ndslice::extent!(host = 2, gpu = 8);
assert_eq!(s.labels(), &["host".to_string(), "gpu".to_string()]);
assert_eq!(s.sizes(), &[2, 8]);