๐ฌThis is a nightly-only experimental API. (
portable_simd
#86656)Modulesยง
- assign ๐
Experimental - Assignment operators
- deref ๐
Experimental - This module hacks in โimplicit derefโ for Simdโs operators. Ideally, Rust would take care of this itself, and method calls usually handle the LHS implicitly. But this is not the case with arithmetic ops.
- shift_
scalar ๐Experimental - unary ๐
Experimental
Macrosยง
- for_
base_ ๐ops Experimental - for_
base_ ๐types Experimental - int_
divrem_ ๐guard Experimental - SAFETY: This macro must only be used to impl Div or Rem and given the matching intrinsic. It guards against LLVMโs UB conditions for integer div or rem using masks and selects, thus guaranteeing a Rust value returns instead.
- unsafe_
base ๐Experimental - wrap_
bitshift ๐Experimental - SAFETY: This macro should not be used for anything except Shl or Shr, and passed the appropriate shift intrinsic.
It handles performing a bitand in addition to calling the shift operator, so that the result
is well-defined: LLVM can return a poison value if you shl, lshr, or ashr if
rhs >= <Int>::BITS
At worst, this will maybe add another instruction and cycle, at best, it may open up more optimization opportunities, or simply be elided entirely, especially for SIMD ISAs which default to this.