🔬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 Divideslhs
byrhs
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_
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 ifx
is greater than or equal toy
, elementwise. - simd_gt⚠
Experimental Tests ifx
is greater thany
, elementwise. - simd_
insert ⚠Experimental Inserts an element into a vector, returning the updated vector. - simd_le⚠
Experimental Tests ifx
is less than or equal toy
, elementwise. - simd_lt⚠
Experimental Tests ifx
is less thany
, 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 Subtractsrhs
fromlhs
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.