pub enum ElementwiseOp {
}Expand description
Elementwise operator lanes: the scalar function one invocation applies per output element.
Variants§
Abs
Ceil
Cos
Erf
Exp
Floor
Log
Negate
Reciprocal
Rsqrt
Sin
Sigmoid
Tanh
Clamp(NanMode)
apply_min(apply_max(x, lo), hi); the bounds arrive as two trailing specialization
constants holding FP32 bit patterns.
Add
Sub
Mul
Pow
Maximum(NanMode)
Minimum(NanMode)
Equal
Greater
GreaterEqual
LogicalAnd
LogicalOr
LogicalXor
LogicalNot
Select
CopyBytes
Byte-exact copy of a BOOL tensor (IDENTITY, RESHAPE on byte storage).
Implementations§
Source§impl ElementwiseOp
impl ElementwiseOp
Sourcepub const fn inputs(self) -> &'static [Storage]
pub const fn inputs(self) -> &'static [Storage]
Storage of each tensor input, in operand order. Word marks a floating-point lane: the
kernel resolves it to its own float storage (Word for FP32, Half for FP16); Byte
lanes are always BOOL.
Sourcepub const fn output(self) -> Storage
pub const fn output(self) -> Storage
Storage of the output tensor, with the same float-lane convention as Self::inputs.
Sourcepub const fn extra_spec_constants(self) -> u32
pub const fn extra_spec_constants(self) -> u32
Trailing operator-specific specialization constants (after the operand and shape block).
Trait Implementations§
Source§impl Clone for ElementwiseOp
impl Clone for ElementwiseOp
Source§fn clone(&self) -> ElementwiseOp
fn clone(&self) -> ElementwiseOp
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 moreimpl Copy for ElementwiseOp
Source§impl Debug for ElementwiseOp
impl Debug for ElementwiseOp
impl Eq for ElementwiseOp
Source§impl Hash for ElementwiseOp
impl Hash for ElementwiseOp
Source§impl PartialEq for ElementwiseOp
impl PartialEq for ElementwiseOp
Source§fn eq(&self, other: &ElementwiseOp) -> bool
fn eq(&self, other: &ElementwiseOp) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ElementwiseOp
Auto Trait Implementations§
impl Freeze for ElementwiseOp
impl RefUnwindSafe for ElementwiseOp
impl Send for ElementwiseOp
impl Sync for ElementwiseOp
impl Unpin for ElementwiseOp
impl UnsafeUnpin for ElementwiseOp
impl UnwindSafe for ElementwiseOp
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