pub enum Instruction {
Compute {
result: ValueId,
op: Op,
inputs: Vec<ValueId>,
attributes: HashMap<String, Attribute>,
},
LoadConstant {
result: ValueId,
tensor_id: TensorId,
},
Phi {
result: ValueId,
incoming: Vec<(BlockId, ValueId)>,
},
}Expand description
SSA instruction
Variants§
Compute
Compute operation: %result = op(%inputs…)
LoadConstant
Load constant: %result = load_constant @tensor_id
Phi
Phi node for control flow: %result = phi [%val1, ^bb1], [%val2, ^bb2]
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for Instruction
impl<'__de, __Context> BorrowDecode<'__de, __Context> for Instruction
Source§fn borrow_decode<__D>(decoder: &mut __D) -> Result<Instruction, DecodeError>where
__D: BorrowDecoder<'__de, Context = __Context>,
fn borrow_decode<__D>(decoder: &mut __D) -> Result<Instruction, DecodeError>where
__D: BorrowDecoder<'__de, Context = __Context>,
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl<__Context> Decode<__Context> for Instruction
impl<__Context> Decode<__Context> for Instruction
Source§fn decode<__D>(decoder: &mut __D) -> Result<Instruction, DecodeError>where
__D: Decoder<Context = __Context>,
fn decode<__D>(decoder: &mut __D) -> Result<Instruction, DecodeError>where
__D: Decoder<Context = __Context>,
Attempt to decode this type with the given Decode.
Source§impl<'de> Deserialize<'de> for Instruction
impl<'de> Deserialize<'de> for Instruction
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Instruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Instruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for Instruction
impl Encode for Instruction
Source§impl Serialize for Instruction
impl Serialize for Instruction
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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