Struct core::arch::x86_64::__m256i 1.27.0[−][src]
#[repr(simd)]pub struct __m256i(_, _, _, _);This is supported on x86-64 only.
Expand description
256 位宽的整数 vector 类型,特定于 x86
此类型与 Intel 定义的 __m256i 类型相同,代表 256 位 SIMD 寄存器。
这种类型的用法通常对应于 x86/x86_64 的 avx 和 up 目标特性。
在内部,此类型可以被视为:
i8x32- 三十二个i8变量包装在一起i16x16- 十六个i16变量包装在一起i32x8- 八个i32变量包装在一起i64x4- 四个i64变量包装在一起
(以及未签名的版本)。 每个内部函数可能会以不同的方式解释内部位,请查看内部函数的文档以了解它是如何使用的。
请注意,这意味着 __m256i 的实例通常仅表示 “bag of bits”,该 “bag of bits” 留待使用时进行解释。
Examples
#[cfg(target_arch = "x86")]
use std::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::*;
let all_bytes_zero = _mm256_setzero_si256();
let all_bytes_one = _mm256_set1_epi8(1);
let eight_i32 = _mm256_set_epi32(1, 2, 3, 4, 5, 6, 7, 8);Run