pub struct RangeifyContext {
pub range_map: HashMap<UOpKey, Arc<UOp>>,
pub range_counter: usize,
}Expand description
Context for rangeify transformation.
Tracks state during the rangeify transformation, including:
- Mapping from original UOps to their rangeified versions
- Counter for generating unique range IDs
Fields§
§range_map: HashMap<UOpKey, Arc<UOp>>Maps old UOps to their rangeified versions.
This allows us to track how each node in the original graph has been transformed during the rangeify process.
Uses UOpKey for HashMap keys since Arc
range_counter: usizeCounter for generating unique range IDs.
Each RANGE operation needs a unique axis_id to distinguish different loop dimensions. This counter ensures we never reuse IDs within a single transformation.
Implementations§
Source§impl RangeifyContext
impl RangeifyContext
Sourcepub fn next_range_id(&mut self) -> usize
pub fn next_range_id(&mut self) -> usize
Get the next available range ID.
Increments the internal counter and returns the previous value. This ensures each range gets a unique ID.
Trait Implementations§
Source§impl Default for RangeifyContext
impl Default for RangeifyContext
Source§fn default() -> RangeifyContext
fn default() -> RangeifyContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RangeifyContext
impl !RefUnwindSafe for RangeifyContext
impl Send for RangeifyContext
impl Sync for RangeifyContext
impl Unpin for RangeifyContext
impl UnsafeUnpin for RangeifyContext
impl !UnwindSafe for RangeifyContext
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more