🔬This is a nightly-only experimental API. (
portable_simd
#86656)Expand description
便携式 SIMD 模块。
该模块为 SIMD 操作提供了一个可移植的抽象,它不受任何特定硬件架构的约束。
Macros
- simd_swizzleExperimental通过将选定 lanes 中的元素复制到其他 vectors 中,创建一个新的 SIMD vector。
Structs
- LaneCountExperimental将 SIMD vector 中的 lanes 的数量指定为类型。
- MaskExperimental
Element
指定宽度的LANES
元素的 SIMD vector 掩码。 - SimdExperimental具有
[T; N]
形状但T
操作的 SIMD vector。
Enums
- WhichExperimental将 lane 索引指定为两个 SIMD vectors 之一。
Traits
- MaskElementExperimental可用作 SIMD 掩码元素的类型的标记 trait。
- SimdCastExperimental支持
Simd::cast
的 trait。通常不需要直接使用。 - SimdCastPtrExperimental支持
Simd::cast_ptr
的 trait。通常不需要直接使用。 - SimdConstPtrExperimental对常量指针的 SIMD vectors 的操作。
- SimdElementExperimental可用作 SIMD vector 元素的类型的标记 trait。
- SimdFloatExperimental对浮点数的 SIMD vectors 的操作。
- SimdIntExperimental对有符号整数的 SIMD vectors 的操作。
- SimdMutPtrExperimental对可变指针的 SIMD vectors 的操作。
- SimdOrdExperimentalParallel
Ord
. - SimdPartialEqExperimentalParallel
PartialEq
. - SimdPartialOrdExperimentalParallel
PartialOrd
. - SimdUintExperimental对无符号整数的 SIMD vectors 的操作。
- StdFloatExperimental这个 trait 提供了 float 函数的可能临时实现,在没有硬件支持的情况下,该实现可以规范地调用操作系统的
math.h
动态加载库 (也称为共享对象)。 - SupportedLaneCountExperimental静态保证 lane 计数被标记为受支持。
- SwizzleExperimental从另一个 vector 的元素创建一个 vector。
- Swizzle2Experimental从另外两个 vectors 的元素创建一个 vector。
- ToBitMaskExperimental将掩码转换为整数位掩码和从整数位掩码转换。
Type Definitions
- f32x1ExperimentalA SIMD vector with one element of type
f32
. - f32x2ExperimentalA SIMD vector with two elements of type
f32
. - f32x4ExperimentalA SIMD vector with four elements of type
f32
. - f32x8ExperimentalA SIMD vector with eight elements of type
f32
. - f32x16ExperimentalA SIMD vector with 16 elements of type
f32
. - f32x32ExperimentalA SIMD vector with 32 elements of type
f32
. - f32x64ExperimentalA SIMD vector with 64 elements of type
f32
. - f64x1ExperimentalA SIMD vector with one element of type
f64
. - f64x2ExperimentalA SIMD vector with two elements of type
f64
. - f64x4ExperimentalA SIMD vector with four elements of type
f64
. - f64x8ExperimentalA SIMD vector with eight elements of type
f64
. - f64x16ExperimentalA SIMD vector with 16 elements of type
f64
. - f64x32ExperimentalA SIMD vector with 32 elements of type
f64
. - f64x64ExperimentalA SIMD vector with 64 elements of type
f64
. - i8x1ExperimentalA SIMD vector with one element of type
i8
. - i8x2ExperimentalA SIMD vector with two elements of type
i8
. - i8x4ExperimentalA SIMD vector with four elements of type
i8
. - i8x8ExperimentalA SIMD vector with eight elements of type
i8
. - i8x16ExperimentalA SIMD vector with 16 elements of type
i8
. - i8x32ExperimentalA SIMD vector with 32 elements of type
i8
. - i8x64ExperimentalA SIMD vector with 64 elements of type
i8
. - i16x1ExperimentalA SIMD vector with one element of type
i16
. - i16x2ExperimentalA SIMD vector with two elements of type
i16
. - i16x4ExperimentalA SIMD vector with four elements of type
i16
. - i16x8ExperimentalA SIMD vector with eight elements of type
i16
. - i16x16ExperimentalA SIMD vector with 16 elements of type
i16
. - i16x32ExperimentalA SIMD vector with 32 elements of type
i16
. - i16x64ExperimentalA SIMD vector with 64 elements of type
i16
. - i32x1ExperimentalA SIMD vector with one element of type
i32
. - i32x2ExperimentalA SIMD vector with two elements of type
i32
. - i32x4ExperimentalA SIMD vector with four elements of type
i32
. - i32x8ExperimentalA SIMD vector with eight elements of type
i32
. - i32x16ExperimentalA SIMD vector with 16 elements of type
i32
. - i32x32ExperimentalA SIMD vector with 32 elements of type
i32
. - i32x64ExperimentalA SIMD vector with 64 elements of type
i32
. - i64x1ExperimentalA SIMD vector with one element of type
i64
. - i64x2ExperimentalA SIMD vector with two elements of type
i64
. - i64x4ExperimentalA SIMD vector with four elements of type
i64
. - i64x8ExperimentalA SIMD vector with eight elements of type
i64
. - i64x16ExperimentalA SIMD vector with 16 elements of type
i64
. - i64x32ExperimentalA SIMD vector with 32 elements of type
i64
. - i64x64ExperimentalA SIMD vector with 64 elements of type
i64
. - isizex1ExperimentalA SIMD vector with one element of type
isize
. - 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
. - isizex16ExperimentalA SIMD vector with 16 elements of type
isize
. - isizex32ExperimentalA SIMD vector with 32 elements of type
isize
. - isizex64ExperimentalA SIMD vector with 64 elements of type
isize
. - mask8x1ExperimentalA SIMD mask with one element for vectors with 8-bit element types.
- mask8x2ExperimentalA SIMD mask with two elements for vectors with 8-bit element types.
- mask8x4ExperimentalA SIMD mask with four elements for vectors with 8-bit element types.
- mask8x8ExperimentalA SIMD mask with eight elements for vectors with 8-bit element types.
- mask8x16ExperimentalA SIMD mask with 16 elements for vectors with 8-bit element types.
- mask8x32ExperimentalA SIMD mask with 32 elements for vectors with 8-bit element types.
- mask8x64ExperimentalA SIMD mask with 64 elements for vectors with 8-bit element types.
- mask16x1ExperimentalA SIMD mask with one element for vectors with 16-bit element types.
- mask16x2ExperimentalA SIMD mask with two elements for vectors with 16-bit element types.
- mask16x4ExperimentalA SIMD mask with four elements for vectors with 16-bit element types.
- mask16x8ExperimentalA SIMD mask with eight elements for vectors with 16-bit element types.
- mask16x16ExperimentalA SIMD mask with 16 elements for vectors with 16-bit element types.
- mask16x32ExperimentalA SIMD mask with 32 elements for vectors with 16-bit element types.
- mask16x64ExperimentalA SIMD mask with 64 elements for vectors with 16-bit element types.
- mask32x1ExperimentalA SIMD mask with one element for vectors with 32-bit element types.
- mask32x2ExperimentalA SIMD mask with two elements for vectors with 32-bit element types.
- mask32x4ExperimentalA SIMD mask with four elements for vectors with 32-bit element types.
- mask32x8ExperimentalA SIMD mask with eight elements for vectors with 32-bit element types.
- mask32x16ExperimentalA SIMD mask with 16 elements for vectors with 32-bit element types.
- mask32x32ExperimentalA SIMD mask with 32 elements for vectors with 32-bit element types.
- mask32x64ExperimentalA SIMD mask with 64 elements for vectors with 32-bit element types.
- mask64x1ExperimentalA SIMD mask with one element for vectors with 64-bit element types.
- mask64x2ExperimentalA SIMD mask with two elements for vectors with 64-bit element types.
- mask64x4ExperimentalA SIMD mask with four elements for vectors with 64-bit element types.
- mask64x8ExperimentalA SIMD mask with eight elements for vectors with 64-bit element types.
- mask64x16ExperimentalA SIMD mask with 16 elements for vectors with 64-bit element types.
- mask64x32ExperimentalA SIMD mask with 32 elements for vectors with 64-bit element types.
- mask64x64ExperimentalA SIMD mask with 64 elements for vectors with 64-bit element types.
- masksizex1ExperimentalA SIMD mask with one element for vectors with pointer-sized element types.
- masksizex2ExperimentalA SIMD mask with two elements for vectors with pointer-sized element types.
- masksizex4ExperimentalA SIMD mask with four elements for vectors with pointer-sized element types.
- masksizex8ExperimentalA SIMD mask with eight elements for vectors with pointer-sized element types.
- masksizex16ExperimentalA SIMD mask with 16 elements for vectors with pointer-sized element types.
- masksizex32ExperimentalA SIMD mask with 32 elements for vectors with pointer-sized element types.
- masksizex64ExperimentalA SIMD mask with 64 elements for vectors with pointer-sized element types.
- u8x1ExperimentalA SIMD vector with one element of type
u8
. - u8x2ExperimentalA SIMD vector with two elements of type
u8
. - u8x4ExperimentalA SIMD vector with four elements of type
u8
. - u8x8ExperimentalA SIMD vector with eight elements of type
u8
. - u8x16ExperimentalA SIMD vector with 16 elements of type
u8
. - u8x32ExperimentalA SIMD vector with 32 elements of type
u8
. - u8x64ExperimentalA SIMD vector with 64 elements of type
u8
. - u16x1ExperimentalA SIMD vector with one element of type
u16
. - u16x2ExperimentalA SIMD vector with two elements of type
u16
. - u16x4ExperimentalA SIMD vector with four elements of type
u16
. - u16x8ExperimentalA SIMD vector with eight elements of type
u16
. - u16x16ExperimentalA SIMD vector with 16 elements of type
u16
. - u16x32ExperimentalA SIMD vector with 32 elements of type
u16
. - u16x64ExperimentalA SIMD vector with 64 elements of type
u16
. - u32x1ExperimentalA SIMD vector with one element of type
u32
. - u32x2ExperimentalA SIMD vector with two elements of type
u32
. - u32x4ExperimentalA SIMD vector with four elements of type
u32
. - u32x8ExperimentalA SIMD vector with eight elements of type
u32
. - u32x16ExperimentalA SIMD vector with 16 elements of type
u32
. - u32x32ExperimentalA SIMD vector with 32 elements of type
u32
. - u32x64ExperimentalA SIMD vector with 64 elements of type
u32
. - u64x1ExperimentalA SIMD vector with one element of type
u64
. - u64x2ExperimentalA SIMD vector with two elements of type
u64
. - u64x4ExperimentalA SIMD vector with four elements of type
u64
. - u64x8ExperimentalA SIMD vector with eight elements of type
u64
. - u64x16ExperimentalA SIMD vector with 16 elements of type
u64
. - u64x32ExperimentalA SIMD vector with 32 elements of type
u64
. - u64x64ExperimentalA SIMD vector with 64 elements of type
u64
. - usizex1ExperimentalA SIMD vector with one element of type
usize
. - 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
. - usizex16ExperimentalA SIMD vector with 16 elements of type
usize
. - usizex32ExperimentalA SIMD vector with 32 elements of type
usize
. - usizex64ExperimentalA SIMD vector with 64 elements of type
usize
.