core::intrinsics::simd - Rust
Description: SIMD compiler intrinsics.

# Module simd

Source
🔬This is a nightly-only experimental API. (`core_intrinsics`)
Expand description

SIMD compiler intrinsics.

In this module, a “vector” is any `repr(simd)` type.

## Functions§

simd_add⚠Experimental
  Adds two simd vectors elementwise.
simd_and⚠Experimental
  “Ands” vectors elementwise.
simd_arith_offset⚠Experimental
  Calculates the offset from a pointer vector elementwise, potentially wrapping.
simd_as⚠Experimental
  Numerically casts a vector, elementwise.
simd_bitmask⚠Experimental
  Truncates an integer vector to a bitmask.
simd_bitreverse⚠Experimental
  Reverses bits of each element.
simd_bswap⚠Experimental
  Swaps bytes of each element.
simd_cast⚠Experimental
  Numerically casts a vector, elementwise.
simd_cast_ptr⚠Experimental
  Casts a vector of pointers.
simd_ceil⚠Experimental
  Rounds up each element to the next highest integer-valued float.
simd_ctlz⚠Experimental
  Counts the leading zeros of each element.
simd_ctpop⚠Experimental
  Counts the number of ones in each element.
simd_cttz⚠Experimental
  Counts the trailing zeros of each element.
simd_div⚠Experimental
  Divides `lhs` by `rhs` elementwise.
simd_eq⚠Experimental
  Tests elementwise equality of two vectors.
simd_expose_provenance⚠Experimental
  Exposes a vector of pointers as a vector of addresses.
simd_extract⚠Experimental
  Extracts an element from a vector.
simd_extract_dyn⚠Experimental
  Extracts an element from a vector.
simd_fabs⚠Experimental
  Returns absolute value of a vector, elementwise.
simd_fcos⚠Experimental
  `T` must be a vector of floats.
simd_fexp⚠Experimental
  `T` must be a vector of floats.
simd_fexp2⚠Experimental
  `T` must be a vector of floats.
simd_flog⚠Experimental
  `T` must be a vector of floats.
simd_flog2⚠Experimental
  `T` must be a vector of floats.
simd_flog10⚠Experimental
  `T` must be a vector of floats.
simd_floor⚠Experimental
  Rounds down each element to the next lowest integer-valued float.
simd_fma⚠Experimental
  Computes `(x*y) + z` for each element, but without any intermediate rounding.
simd_fmax⚠Experimental
  Returns the maximum of two vectors, elementwise.
simd_fmin⚠Experimental
  Returns the minimum of two vectors, elementwise.
simd_fsin⚠Experimental
  `T` must be a vector of floats.
simd_fsqrt⚠Experimental
  Takes the square root of each element.
simd_gather⚠Experimental
  Reads a vector of pointers.
simd_ge⚠Experimental
  Tests if `x` is greater than or equal to `y`, elementwise.
simd_gt⚠Experimental
  Tests if `x` is greater than `y`, elementwise.
simd_insert⚠Experimental
  Inserts an element into a vector, returning the updated vector.
simd_insert_dyn⚠Experimental
  Inserts an element into a vector, returning the updated vector.
simd_le⚠Experimental
  Tests if `x` is less than or equal to `y`, elementwise.
simd_lt⚠Experimental
  Tests if `x` is less than `y`, elementwise.
simd_masked_load⚠Experimental
  Reads a vector of pointers.
simd_masked_store⚠Experimental
  Writes to a vector of pointers.
simd_mul⚠Experimental
  Multiplies two simd vectors elementwise.
simd_ne⚠Experimental
  Tests elementwise inequality equality of two vectors.
simd_neg⚠Experimental
  Negates a vector elementwise.
simd_or⚠Experimental
  “Ors” vectors elementwise.
simd_reduce_add_ordered⚠Experimental
  Adds elements within a vector from left to right.
simd_reduce_add_unordered⚠Experimental
  Adds elements within a vector in arbitrary order. May also be re-associated with unordered additions on the inputs/outputs.
simd_reduce_all⚠Experimental
  Checks if all mask values are true.
simd_reduce_and⚠Experimental
  Logical “ands” all elements together.
simd_reduce_any⚠Experimental
  Checks if any mask value is true.
simd_reduce_max⚠Experimental
  Returns the maximum element of a vector.
simd_reduce_min⚠Experimental
  Returns the minimum element of a vector.
simd_reduce_mul_ordered⚠Experimental
  Multiplies elements within a vector from left to right.
simd_reduce_mul_unordered⚠Experimental
  Multiplies elements within a vector in arbitrary order. May also be re-associated with unordered additions on the inputs/outputs.
simd_reduce_or⚠Experimental
  Logical “ors” all elements together.
simd_reduce_xor⚠Experimental
  Logical “exclusive ors” all elements together.
simd_relaxed_fma⚠Experimental
  Computes `(x*y) + z` for each element, non-deterministically executing either a fused multiply-add or two operations with rounding of the intermediate result.
simd_rem⚠Experimental
  Returns remainder of two vectors elementwise.
simd_round⚠Experimental
  Rounds each element to the closest integer-valued float. Ties are resolved by rounding away from 0.
simd_saturating_add⚠Experimental
  Adds two simd vectors elementwise, with saturation.
simd_saturating_sub⚠Experimental
  Subtracts two simd vectors elementwise, with saturation.
simd_scatter⚠Experimental
  Writes to a vector of pointers.
simd_select⚠Experimental
  Selects elements from a mask.
simd_select_bitmask⚠Experimental
  Selects elements from a bitmask.
simd_shl⚠Experimental
  Shifts vector left elementwise, with UB on overflow.
simd_shr⚠Experimental
  Shifts vector right elementwise, with UB on overflow.
simd_shuffle⚠Experimental
  Shuffles two vectors by const indices.
simd_sub⚠Experimental
  Subtracts `rhs` from `lhs` elementwise.
simd_trunc⚠Experimental
  Returns the integer part of each element as an integer-valued float. In other words, non-integer values are truncated towards zero.
simd_with_exposed_provenance⚠Experimental
  Creates a vector of pointers from a vector of addresses.
simd_xor⚠Experimental
  “Exclusive ors” vectors elementwise.