pub enum Instr {
Show 16 variants
DefineAcc(Const),
DefineGlobal {
index: usize,
dtype: DType,
},
DefineLocal {
size: usize,
dtype: DType,
},
Special(Special),
Const(Const),
Unary {
op: UnaryOp,
arg: A,
dtype: DType,
},
Binary {
op: BinaryOp,
lhs: A,
rhs: A,
dtype: DType,
},
Range {
lo: A,
up: A,
step: usize,
end_idx: VarId,
},
Load {
src: VarId,
offset: A,
dtype: DType,
},
Assign {
dst: VarId,
src: A,
},
EndRange {
start_idx: VarId,
},
If {
cond: A,
end_idx: VarId,
},
EndIf,
Store {
dst: VarId,
offset: A,
value: A,
dtype: DType,
},
Barrier,
ReduceLocal {
op: ReduceOp,
arg: A,
dtype: DType,
},
}Expand description
The loop start_idx and end_idx are using VarIds as these are derived from line numbers in the final SSA.
Variants§
DefineAcc(Const)
DefineGlobal
DefineLocal
Special(Special)
Const(Const)
Unary
Binary
Range
Load
Assign
EndRange
If
EndIf
Store
Barrier
ReduceLocal
Trait Implementations§
Source§impl Ord for Instr
impl Ord for Instr
Source§impl PartialOrd for Instr
impl PartialOrd for Instr
impl Eq for Instr
impl StructuralPartialEq for Instr
Auto Trait Implementations§
impl Freeze for Instr
impl RefUnwindSafe for Instr
impl Send for Instr
impl Sync for Instr
impl Unpin for Instr
impl UnwindSafe for Instr
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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