pub enum UnaryOp {
Negate,
Reciprocal,
Abs,
Sqrt,
}Expand description
Element-wise unary operation kind.
Used with PrimDescriptor::ElementwiseUnary for point-wise
transformations. Maps to cutensorElementwiseTrinary (unary case)
on GPU.
Note: square (x²) is omitted — expressible as
ElementwiseMul(x, x) without an extra copy.
§Examples
use tenferro_prims::UnaryOp;
let op = UnaryOp::Reciprocal;
assert_eq!(op, UnaryOp::Reciprocal);Variants§
Trait Implementations§
impl Copy for UnaryOp
impl Eq for UnaryOp
impl StructuralPartialEq for UnaryOp
Auto Trait Implementations§
impl Freeze for UnaryOp
impl RefUnwindSafe for UnaryOp
impl Send for UnaryOp
impl Sync for UnaryOp
impl Unpin for UnaryOp
impl UnwindSafe for UnaryOp
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