Function core::arch::x86_64::_mm256_unpackhi_epi321.27.0[][src]

pub unsafe fn _mm256_unpackhi_epi32(a: __m256i, b: __m256i) -> __m256i
This is supported on x86-64 and target feature avx2 only.
Expand description

从每个高位的一半拆包并交织 32 位整数 ab 的 128 位通道

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

let a = _mm256_setr_epi32(0, 1, 2, 3, 4, 5, 6, 7);
let b = _mm256_setr_epi32(0, -1, -2, -3, -4, -5, -6, -7);

let c = _mm256_unpackhi_epi32(a, b);

let expected = _mm256_setr_epi32(2, -2, 3, -3, 6, -6, 7, -7);
assert_eq!(_mm256_movemask_epi8(_mm256_cmpeq_epi8(c, expected)), !0);
Run

Intel’s documentation