Module core::intrinsics::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_addExperimental
    Adds two simd vectors elementwise.
  • simd_andExperimental
    “Ands” vectors elementwise.
  • simd_arith_offsetExperimental
    Calculates the offset from a pointer vector elementwise, potentially wrapping.
  • simd_asExperimental
    Numerically casts a vector, elementwise.
  • simd_bitmaskExperimental
    Truncates an integer vector to a bitmask.
  • simd_bitreverseExperimental
    Reverses bits of each element.
  • simd_bswapExperimental
    Swaps bytes of each element.
  • simd_castExperimental
    Numerically casts a vector, elementwise.
  • simd_cast_ptrExperimental
    Casts a vector of pointers.
  • simd_ceilExperimental
    Rounds up each element to the next highest integer-valued float.
  • simd_ctlzExperimental
    Counts the leading zeros of each element.
  • simd_ctpopExperimental
    Counts the number of ones in each element.
  • simd_cttzExperimental
    Counts the trailing zeros of each element.
  • simd_divExperimental
    Divides lhs by rhs elementwise.
  • simd_eqExperimental
    Tests elementwise equality of two vectors.
  • simd_expose_provenanceExperimental
    Exposes a vector of pointers as a vector of addresses.
  • simd_extractExperimental
    Extracts an element from a vector.
  • simd_fabsExperimental
    Returns absolute value of a vector, elementwise.
  • simd_fcosExperimental
    T must be a vector of floats.
  • simd_fexpExperimental
    T must be a vector of floats.
  • simd_fexp2Experimental
    T must be a vector of floats.
  • simd_flogExperimental
    T must be a vector of floats.
  • simd_flog2Experimental
    T must be a vector of floats.
  • simd_flog10Experimental
    T must be a vector of floats.
  • simd_floorExperimental
    Rounds down each element to the next lowest integer-valued float.
  • simd_fmaExperimental
    Computes (x*y) + z for each element, but without any intermediate rounding.
  • simd_fmaxExperimental
    Returns the maximum of two vectors, elementwise.
  • simd_fminExperimental
    Returns the minimum of two vectors, elementwise.
  • simd_fsinExperimental
    T must be a vector of floats.
  • simd_fsqrtExperimental
    Takes the square root of each element.
  • simd_gatherExperimental
    Reads a vector of pointers.
  • simd_geExperimental
    Tests if x is greater than or equal to y, elementwise.
  • simd_gtExperimental
    Tests if x is greater than y, elementwise.
  • simd_insertExperimental
    Inserts an element into a vector, returning the updated vector.
  • simd_leExperimental
    Tests if x is less than or equal to y, elementwise.
  • simd_ltExperimental
    Tests if x is less than y, elementwise.
  • simd_masked_loadExperimental
    Reads a vector of pointers.
  • simd_masked_storeExperimental
    Writes to a vector of pointers.
  • simd_mulExperimental
    Multiplies two simd vectors elementwise.
  • simd_neExperimental
    Tests elementwise inequality equality of two vectors.
  • simd_negExperimental
    Negates a vector elementwise.
  • simd_orExperimental
    “Ors” vectors elementwise.
  • Adds elements within a vector from left to right.
  • Adds elements within a vector in arbitrary order. May also be re-associated with unordered additions on the inputs/outputs.
  • simd_reduce_allExperimental
    Checks if all mask values are true.
  • simd_reduce_andExperimental
    Logical “ands” all elements together.
  • simd_reduce_anyExperimental
    Checks if any mask value is true.
  • simd_reduce_maxExperimental
    Returns the maximum element of a vector.
  • simd_reduce_minExperimental
    Returns the minimum element of a vector.
  • Multiplies elements within a vector from left to right.
  • Multiplies elements within a vector in arbitrary order. May also be re-associated with unordered additions on the inputs/outputs.
  • simd_reduce_orExperimental
    Logical “ors” all elements together.
  • simd_reduce_xorExperimental
    Logical “exclusive ors” all elements together.
  • simd_remExperimental
    Returns remainder of two vectors elementwise.
  • simd_roundExperimental
    Rounds each element to the closest integer-valued float. Ties are resolved by rounding away from 0.
  • simd_saturating_addExperimental
    Adds two simd vectors elementwise, with saturation.
  • simd_saturating_subExperimental
    Subtracts two simd vectors elementwise, with saturation.
  • simd_scatterExperimental
    Writes to a vector of pointers.
  • simd_selectExperimental
    Selects elements from a mask.
  • simd_select_bitmaskExperimental
    Selects elements from a bitmask.
  • simd_shlExperimental
    Shifts vector left elementwise, with UB on overflow.
  • simd_shrExperimental
    Shifts vector right elementwise, with UB on overflow.
  • simd_shuffleExperimental
    Shuffles two vectors by const indices.
  • simd_subExperimental
    Subtracts rhs from lhs elementwise.
  • simd_truncExperimental
    Returns the integer part of each element as an integer-valued float. In other words, non-integer values are truncated towards zero.
  • Creates a vector of pointers from a vector of addresses.
  • simd_xorExperimental
    “Exclusive ors” vectors elementwise.