🔬This is a nightly-only experimental API. (
portable_simd
#86656)Expand description
Portable SIMD module.
This module offers a portable abstraction for SIMD operations that is not bound to any particular hardware architecture.
Macros
- simd_swizzleExperimentalConstructs a new SIMD vector by copying elements from selected lanes in other vectors.
Structs
- LaneCountExperimentalSpecifies the number of lanes in a SIMD vector as a type.
- MaskExperimentalA SIMD vector mask for
LANES
elements of width specified byElement
. - SimdExperimentalA SIMD vector of
LANES
elements of typeT
.Simd<T, N>
has the same shape as[T; N]
, but operates likeT
.
Enums
- WhichExperimentalSpecifies a lane index into one of two SIMD vectors.
Traits
- MaskElementExperimentalMarker trait for types that may be used as SIMD mask elements.
- SimdElementExperimentalMarker trait for types that may be used as SIMD vector elements.
- SimdFloatExperimentalOperations on SIMD vectors of floats.
- SimdIntExperimentalOperations on SIMD vectors of signed integers.
- SimdOrdExperimentalParallel
Ord
. - SimdPartialEqExperimentalParallel
PartialEq
. - SimdPartialOrdExperimentalParallel
PartialOrd
. - SimdUintExperimentalOperations on SIMD vectors of unsigned integers.
- StdFloatExperimentalThis trait provides a possibly-temporary implementation of float functions that may, in the absence of hardware support, canonicalize to calling an operating system’s
math.h
dynamically-loaded library (also known as a shared object). As these conditionally require runtime support, they should only appear in binaries built assuming OS support:std
. - SupportedLaneCountExperimentalStatically guarantees that a lane count is marked as supported.
- SwizzleExperimentalCreate a vector from the elements of another vector.
- Swizzle2ExperimentalCreate a vector from the elements of two other vectors.
- ToBitMaskExperimentalConverts masks to and from integer bitmasks.
Type Definitions
- f32x2ExperimentalA 64-bit SIMD vector with two elements of type
f32
. - f32x4ExperimentalA 128-bit SIMD vector with four elements of type
f32
. - f32x8ExperimentalA 256-bit SIMD vector with eight elements of type
f32
. - f32x16ExperimentalA 512-bit SIMD vector with 16 elements of type
f32
. - f64x2ExperimentalA 128-bit SIMD vector with two elements of type
f64
. - f64x4ExperimentalA 256-bit SIMD vector with four elements of type
f64
. - f64x8ExperimentalA 512-bit SIMD vector with eight elements of type
f64
. - i8x4ExperimentalA 32-bit SIMD vector with four elements of type
i8
. - i8x8ExperimentalA 64-bit SIMD vector with eight elements of type
i8
. - i8x16ExperimentalA 128-bit SIMD vector with 16 elements of type
i8
. - i8x32ExperimentalA 256-bit SIMD vector with 32 elements of type
i8
. - i8x64ExperimentalA 512-bit SIMD vector with 64 elements of type
i8
. - i16x2ExperimentalA 32-bit SIMD vector with two elements of type
i16
. - i16x4ExperimentalA 64-bit SIMD vector with four elements of type
i16
. - i16x8ExperimentalA 128-bit SIMD vector with eight elements of type
i16
. - i16x16ExperimentalA 256-bit SIMD vector with 16 elements of type
i16
. - i16x32ExperimentalA 512-bit SIMD vector with 32 elements of type
i16
. - i32x2ExperimentalA 64-bit SIMD vector with two elements of type
i32
. - i32x4ExperimentalA 128-bit SIMD vector with four elements of type
i32
. - i32x8ExperimentalA 256-bit SIMD vector with eight elements of type
i32
. - i32x16ExperimentalA 512-bit SIMD vector with 16 elements of type
i32
. - i64x2ExperimentalA 128-bit SIMD vector with two elements of type
i64
. - i64x4ExperimentalA 256-bit SIMD vector with four elements of type
i64
. - i64x8ExperimentalA 512-bit SIMD vector with eight elements of type
i64
. - isizex2ExperimentalA SIMD vector with two elements of type
isize
. - isizex4ExperimentalA SIMD vector with four elements of type
isize
. - isizex8ExperimentalA SIMD vector with eight elements of type
isize
. - mask8x8ExperimentalA mask for SIMD vectors with eight elements of 8 bits.
- mask8x16ExperimentalA mask for SIMD vectors with 16 elements of 8 bits.
- mask8x32ExperimentalA mask for SIMD vectors with 32 elements of 8 bits.
- mask8x64ExperimentalA mask for SIMD vectors with 64 elements of 8 bits.
- mask16x4ExperimentalA mask for SIMD vectors with four elements of 16 bits.
- mask16x8ExperimentalA mask for SIMD vectors with eight elements of 16 bits.
- mask16x16ExperimentalA mask for SIMD vectors with 16 elements of 16 bits.
- mask16x32ExperimentalA mask for SIMD vectors with 32 elements of 16 bits.
- mask32x2ExperimentalA mask for SIMD vectors with two elements of 32 bits.
- mask32x4ExperimentalA mask for SIMD vectors with four elements of 32 bits.
- mask32x8ExperimentalA mask for SIMD vectors with eight elements of 32 bits.
- mask32x16ExperimentalA mask for SIMD vectors with 16 elements of 32 bits.
- mask64x2ExperimentalA mask for SIMD vectors with two elements of 64 bits.
- mask64x4ExperimentalA mask for SIMD vectors with four elements of 64 bits.
- mask64x8ExperimentalA mask for SIMD vectors with eight elements of 64 bits.
- masksizex2ExperimentalA mask for SIMD vectors with two elements of pointer width.
- masksizex4ExperimentalA mask for SIMD vectors with four elements of pointer width.
- masksizex8ExperimentalA mask for SIMD vectors with eight elements of pointer width.
- u8x4ExperimentalA 32-bit SIMD vector with four elements of type
u8
. - u8x8ExperimentalA 64-bit SIMD vector with eight elements of type
u8
. - u8x16ExperimentalA 128-bit SIMD vector with 16 elements of type
u8
. - u8x32ExperimentalA 256-bit SIMD vector with 32 elements of type
u8
. - u8x64ExperimentalA 512-bit SIMD vector with 64 elements of type
u8
. - u16x2ExperimentalA 32-bit SIMD vector with two elements of type
u16
. - u16x4ExperimentalA 64-bit SIMD vector with four elements of type
u16
. - u16x8ExperimentalA 128-bit SIMD vector with eight elements of type
u16
. - u16x16ExperimentalA 256-bit SIMD vector with 16 elements of type
u16
. - u16x32ExperimentalA 512-bit SIMD vector with 32 elements of type
u16
. - u32x2ExperimentalA 64-bit SIMD vector with two elements of type
u32
. - u32x4ExperimentalA 128-bit SIMD vector with four elements of type
u32
. - u32x8ExperimentalA 256-bit SIMD vector with eight elements of type
u32
. - u32x16ExperimentalA 512-bit SIMD vector with 16 elements of type
u32
. - u64x2ExperimentalA 128-bit SIMD vector with two elements of type
u64
. - u64x4ExperimentalA 256-bit SIMD vector with four elements of type
u64
. - u64x8ExperimentalA 512-bit SIMD vector with eight elements of type
u64
. - usizex2ExperimentalA SIMD vector with two elements of type
usize
. - usizex4ExperimentalA SIMD vector with four elements of type
usize
. - usizex8ExperimentalA SIMD vector with eight elements of type
usize
.