pub enum RmwOp {
Add,
Sub,
Mul,
And,
Or,
Xor,
AddF,
SubF,
MulF,
}Expand description
The operation of a fused read-modify-write MicroOp::ArrRMW:
buf[idx-1] = buf[idx-1] <op> operand. The INT ops (Add/Sub/Mul wrap as the
kernel’s i64 arithmetic; And/Or/Xor bitwise) treat the element and operand as
raw i64; the FLOAT ops (AddF/SubF/MulF) reinterpret both as f64 (the nbody
velocity/position-update idiom). Sub/SubF are the only non-commutative
members — the peephole fuses them only when the loaded element is the LEFT
operand.
Variants§
Add
Wrapping addition.
Sub
Wrapping subtraction (buf[i] - operand).
Mul
Wrapping multiplication.
And
Bitwise AND.
Or
Bitwise OR.
Xor
Bitwise XOR.
AddF
IEEE addition (operands reinterpreted as f64).
SubF
IEEE subtraction (buf[i] - operand, as f64).
MulF
IEEE multiplication (as f64).
Implementations§
Trait Implementations§
impl Copy for RmwOp
impl Eq for RmwOp
impl StructuralPartialEq for RmwOp
Auto Trait Implementations§
impl Freeze for RmwOp
impl RefUnwindSafe for RmwOp
impl Send for RmwOp
impl Sync for RmwOp
impl Unpin for RmwOp
impl UnsafeUnpin for RmwOp
impl UnwindSafe for RmwOp
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