pub enum NodeKind {
Show 15 variants
Assign {
name: String,
dtype: DType,
dims: Vec<String>,
},
Op {
op: OpKind,
attrs: OpAttrs,
inputs: Vec<String>,
output: String,
},
Branch {
cond: Option<String>,
then_block: String,
else_block: Option<String>,
},
Barrier,
Dep {
after: String,
before: String,
},
CacheRead {
src: CacheAccess,
dst: String,
},
CacheWrite {
src: String,
dst: CacheAccess,
},
CacheIncrement {
target: String,
amount: i64,
},
CacheDecrement {
target: String,
amount: i64,
},
CacheReset {
target: CacheAccess,
},
Transfer {
src: String,
dst: String,
},
Yield {
vars: Vec<String>,
},
Await {
vars: Vec<String>,
},
Loop {
name: String,
index: String,
start: String,
end: String,
body: Vec<Node>,
},
Return,
}Expand description
Node variants that make up a graph.
Variants§
Assign
Op
Branch
Barrier
Dep
CacheRead
CacheWrite
CacheIncrement
CacheDecrement
CacheReset
Fields
§
target: CacheAccessTransfer
Yield
Await
Loop
Return
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeKind
impl<'de> Deserialize<'de> for NodeKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnwindSafe for NodeKind
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> 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