Rate This Document
Findability
Accuracy
Completeness
Readability

Replacing the _mm_testz_si128 Function

This function is used to calculate the bit operation results of vectors a and b. For details about _mm_testz_si128, see Intrinsics Guide.

  • Code on x86:
    all_zeros = _mm_testz_si128(zero_bytes, zero_bytes);
  • Alternative for Kunpeng processors:
    #include <arm_neon.h>
    all_zeros = vgetq_lane_s32(vandq_s32(zero_bytes, zero_bytes), 0) == 0;