Function safe_arch::test_all_zeroes_m128i
source ยท pub fn test_all_zeroes_m128i(a: m128i, mask: m128i) -> i32
Available with target feature
sse4.1
only.Expand description
Returns if all masked bits are 0, (a & mask) as u128 == 0
- Intrinsic:
_mm_test_all_zeros
- Assembly: ptest xmm, xmm
let a = m128i::from(0b111_u128);
let mask = m128i::from(u128::MAX);
assert_eq!(test_all_zeroes_m128i(a, mask), 0);
//
let a = m128i::from(0b0_u128);
let mask = m128i::from(u128::MAX);
assert_eq!(test_all_zeroes_m128i(a, mask), 1);
//
let a = m128i::from(0b1_0000_u128);
let mask = m128i::from(0b0_1111_u128);
assert_eq!(test_all_zeroes_m128i(a, mask), 1);