Expand description
Pairwise lane-wise elementwise operation strategies.
ElementOp<T> is a sealed ZST trait used by zip_reduce, zip_cow, and
transform_in_place to parameterize binary vector operations without code
duplication. All apply impls are #[inline(always)] — DCE removes unused strategies.
Structs§
- Add
- Elementwise addition:
a[i] + b[i]. - BitAnd
- Elementwise bitwise AND:
a[i] & b[i]. - BitOr
- Elementwise bitwise OR:
a[i] | b[i]. - BitXor
- Elementwise bitwise XOR:
a[i] ^ b[i]. - Clamp
- Elementwise clamp:
min(max(a[i], lo), hi). - Div
- Elementwise division:
a[i] / b[i]. - FmaAdd
- Fused-multiply-add elementwise operation:
out[i] = a[i] * b[i] + a[i](binary form). - Mul
- Elementwise multiplication:
a[i] * b[i]. - Sub
- Elementwise subtraction:
a[i] - b[i].
Traits§
- Element
Op - Sealed ZST trait for pairwise SIMD elementwise operations.