pub enum Op<D>where
D: Device,{
Unary(UnaryOp, LazyBuffer<D>),
Binary(BinaryOp, LazyBuffer<D>, LazyBuffer<D>),
MatMul(LazyBuffer<D>, LazyBuffer<D>, (usize, usize, usize, usize), bool),
Reduce(ReduceOp, LazyBuffer<D>, usize),
Const(Const),
Value,
Layout(LayoutOp, LazyBuffer<D>),
Reshape(LazyBuffer<D>),
Custom {
f: CustomF<<D as Device>::Slice>,
args: Vec<LazyBuffer<D>>,
},
CustomIp {
f: CustomF<<D as Device>::Slice>,
args: Vec<LazyBuffer<D>>,
src: LazyBuffer<D>,
},
Ssa {
ssa: Kernel,
args: Vec<LazyBuffer<D>>,
},
Set {
values: LazyBuffer<D>,
src: LazyBuffer<D>,
dst_layout: Layout,
},
}Variants§
Unary(UnaryOp, LazyBuffer<D>)
Binary(BinaryOp, LazyBuffer<D>, LazyBuffer<D>)
MatMul(LazyBuffer<D>, LazyBuffer<D>, (usize, usize, usize, usize), bool)
Reduce(ReduceOp, LazyBuffer<D>, usize)
Const(Const)
Value
Values are leafs of the op DAG, holding values that do not depend on other values.
Layout(LayoutOp, LazyBuffer<D>)
Reshape(LazyBuffer<D>)
Custom
CustomIp
In-place variant of the custom op.
Ssa
Custom op based on some SSA code.
Set
Set the data from src using data from values. The LazyBuffer is shared between self and src.
Trait Implementations§
Auto Trait Implementations§
impl<D> Freeze for Op<D>
impl<D> !RefUnwindSafe for Op<D>
impl<D> !Send for Op<D>
impl<D> !Sync for Op<D>
impl<D> Unpin for Op<D>
impl<D> !UnwindSafe for Op<D>
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