pub enum Extent {
Scalar(usize),
Range {
min: usize,
max: usize,
sym: SymId,
},
}Expand description
A single dimension’s extent: a build-time constant, or a bounded runtime symbol.
Shape::dims() reports the bound (a Scalar’s value, or a Range’s
max/capacity) — which is what sizing/striding/iteration want. The live
value of a Range is resolved per forward pass through a SymEnv.
Scalar carries no symbol: two build-time constants that must match
already match by being equal, and a runtime dimension always has a
capacity bound, so it is a Range, never a Scalar.
Phase D step 1b. See
docs/session-prompts/symbolic-extents-and-persistent-decode.md.
Variants§
Scalar(usize)
A dimension fixed at graph-construction time.
Range
A bounded runtime dimension: live value in [min, max], resolved via
the SymEnv under sym. max is the capacity (what dims() reports).
Implementations§
Trait Implementations§
impl Copy for Extent
impl Eq for Extent
impl StructuralPartialEq for Extent
Auto Trait Implementations§
impl Freeze for Extent
impl RefUnwindSafe for Extent
impl Send for Extent
impl Sync for Extent
impl Unpin for Extent
impl UnsafeUnpin for Extent
impl UnwindSafe for Extent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.