no_std_compat::arch::x86

Function _mm256_unpacklo_epi32

1.27.0 · Source
pub unsafe fn _mm256_unpacklo_epi32(a: __m256i, b: __m256i) -> __m256i
Available on x86 only.
Expand description

Unpacks and interleave 32-bit integers from the low half of each 128-bit lane of a and b.

#[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_unpacklo_epi32(a, b);

let expected = _mm256_setr_epi32(0, 0, 1, -1, 4, -4, 5, -5);
assert_eq!(_mm256_movemask_epi8(_mm256_cmpeq_epi8(c, expected)), !0);

Intel’s documentation