pub enum ComputeOp {
Show 31 variants
Add,
Sub,
Mul,
Div,
Rem,
Neg,
BitAnd,
BitOr,
BitXor,
BitNot,
Shl,
Shr,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
And,
Or,
Not,
IntToFloat,
FloatToInt,
SignExtend,
ZeroExtend,
Truncate,
Min,
Max,
Abs,
Sqrt,
Fma,
}Expand description
Arithmetic/logic operations for Compute operators
Variants§
Add
Sub
Mul
Div
Rem
Neg
BitAnd
BitOr
BitXor
BitNot
Shl
Shr
Eq
Ne
Lt
Le
Gt
Ge
And
Or
Not
IntToFloat
FloatToInt
SignExtend
ZeroExtend
Truncate
Min
Max
Abs
Sqrt
Fma
Implementations§
Source§impl ComputeOp
impl ComputeOp
Sourcepub fn input_count(&self) -> usize
pub fn input_count(&self) -> usize
Number of inputs required for this operation
Sourcepub fn energy_cost(&self) -> u32
pub fn energy_cost(&self) -> u32
Estimated energy cost (relative units, higher = more energy)
Trait Implementations§
impl Copy for ComputeOp
impl Eq for ComputeOp
impl StructuralPartialEq for ComputeOp
Auto Trait Implementations§
impl Freeze for ComputeOp
impl RefUnwindSafe for ComputeOp
impl Send for ComputeOp
impl Sync for ComputeOp
impl Unpin for ComputeOp
impl UnwindSafe for ComputeOp
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.