Struct core::arch::x86::__m128i1.27.0[][src]

#[repr(simd)]
pub struct __m128i(_, _);
This is supported on x86 only.
Expand description

128 位宽的整数 vector 类型,特定于 x86

此类型与 Intel 定义的 __m128i 类型相同,代表一个 128 位 SIMD 寄存器。 这种类型的用法通常对应于 sse 和 x86/x86_64 的向上目标功能。

在内部,此类型可以被视为:

  • i8x16 - 十六个 i8 变量包装在一起
  • i16x8 - 八个 i16 变量包装在一起
  • i32x4 - 四个 i32 变量包装在一起
  • i64x2 - 两个 i64 变量包装在一起

(以及未签名的版本)。 每个内联函数可能对内部位的解释不同,请查看内联函数的文档以了解其用法。

请注意,这意味着 __m128i 的实例通常仅表示 “bag of bits”,该 “bag of bits” 留待使用时进行解释。

使用 __m128i 的大多数内联函数都以 _mm_ 作为前缀,并且整数类型往往对应于后缀,例如 “epi8” 或 “epi32”。

Examples

#[cfg(target_arch = "x86")]
use std::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;

let all_bytes_zero = _mm_setzero_si128();
let all_bytes_one = _mm_set1_epi8(1);
let four_i32 = _mm_set_epi32(1, 2, 3, 4);
Run

Trait Implementations

This is supported on x86 or x86-64 only.

返回值的副本。 Read more

source 执行复制分配。 Read more

This is supported on x86 or x86-64 only.

使用给定的格式化程序格式化该值。 Read more

This is supported on x86 or x86-64 only.

Auto Trait Implementations

Blanket Implementations

获取 selfTypeIdRead more

从拥有的值中一成不变地借用。 Read more

从拥有的值中借用。 Read more

执行转换。

执行转换。

发生转换错误时返回的类型。

执行转换。

发生转换错误时返回的类型。

执行转换。