Function safe_arch::test_all_ones_m128i
source ยท pub fn test_all_ones_m128i(a: m128i) -> i32
Available with target feature
sse4.1
only.Expand description
Tests if all bits are 1.
- Intrinsic:
_mm_test_all_ones
- Assembly: pcmpeqd xmm, xmm / ptest xmm, xmm
let a = m128i::from(0_u128);
let b = m128i::from(u128::MAX);
assert_eq!(test_all_ones_m128i(a), 0);
assert_eq!(test_all_ones_m128i(b), 1);