pub enum Op<T: FloatDType> {
Show 21 variants
Binary(Tensor<T>, Tensor<T>, BinaryOp),
BinaryScalarRhs(Tensor<T>, T, BinaryOp),
BinaryScalarLhs(T, Tensor<T>, BinaryOp),
Unary(Tensor<T>, UnaryOp<T>),
Reduce(Tensor<T>, ReduceOp, Vec<usize>),
Matmul(Tensor<T>, Tensor<T>),
Broadcast(Tensor<T>),
Narrow(Tensor<T>, usize, usize, usize),
Slice(Tensor<T>, usize, usize, usize, usize),
IndexSelect(Tensor<T>, IntTensor, usize),
IndexAdd(Tensor<T>, IntTensor, Tensor<T>, usize),
ScatterAdd(Tensor<T>, IntTensor, Tensor<T>, usize),
Gather(Tensor<T>, IntTensor, usize),
Reshape(Tensor<T>),
Transpose(Tensor<T>, usize, usize),
Permute(Tensor<T>, Vec<usize>),
Cat(Vec<Tensor<T>>, usize),
IfElse(Tensor<bool>, Option<Tensor<T>>, Option<Tensor<T>>),
Copy(Tensor<T>),
RmsNorm(Tensor<T>, Tensor<T>, T),
Softmax(Tensor<T>, usize),
}Variants§
Binary(Tensor<T>, Tensor<T>, BinaryOp)
BinaryScalarRhs(Tensor<T>, T, BinaryOp)
BinaryScalarLhs(T, Tensor<T>, BinaryOp)
Unary(Tensor<T>, UnaryOp<T>)
Reduce(Tensor<T>, ReduceOp, Vec<usize>)
Matmul(Tensor<T>, Tensor<T>)
Broadcast(Tensor<T>)
Narrow(Tensor<T>, usize, usize, usize)
Slice(Tensor<T>, usize, usize, usize, usize)
IndexSelect(Tensor<T>, IntTensor, usize)
IndexAdd(Tensor<T>, IntTensor, Tensor<T>, usize)
ScatterAdd(Tensor<T>, IntTensor, Tensor<T>, usize)
Gather(Tensor<T>, IntTensor, usize)
Reshape(Tensor<T>)
Transpose(Tensor<T>, usize, usize)
Permute(Tensor<T>, Vec<usize>)
Cat(Vec<Tensor<T>>, usize)
IfElse(Tensor<bool>, Option<Tensor<T>>, Option<Tensor<T>>)
Copy(Tensor<T>)
RmsNorm(Tensor<T>, Tensor<T>, T)
Softmax(Tensor<T>, usize)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Op<T>
impl<T> RefUnwindSafe for Op<T>where
Tensor<T>: RefUnwindSafe,
T: RefUnwindSafe,
UnaryOp<T>: RefUnwindSafe,
Vec<Tensor<T>>: RefUnwindSafe,
Option<Tensor<T>>: RefUnwindSafe,
impl<T> Send for Op<T>
impl<T> Sync for Op<T>
impl<T> Unpin for Op<T>
impl<T> UnsafeUnpin for Op<T>where
Tensor<T>: UnsafeUnpin,
T: UnsafeUnpin,
UnaryOp<T>: UnsafeUnpin,
Vec<Tensor<T>>: UnsafeUnpin,
Option<Tensor<T>>: UnsafeUnpin,
impl<T> UnwindSafe for Op<T>where
Tensor<T>: UnwindSafe,
T: UnwindSafe,
UnaryOp<T>: UnwindSafe,
Vec<Tensor<T>>: UnwindSafe,
Option<Tensor<T>>: UnwindSafe,
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