16 #ifndef included_vector_neon_h 17 #define included_vector_neon_h 22 #define u8x16_splat(i) vdupq_n_u8(i) 23 #define u16x8_splat(i) vdupq_n_u16(i) 24 #define i16x8_splat(i) vdupq_n_s16(i) 25 #define u32x4_splat(i) vdupq_n_u32(i) 26 #define i32x4_splat(i) vdupq_n_s32(i) 29 #define u16x8_add(a,b) vaddq_u16(a,b) 30 #define i16x8_add(a,b) vaddq_s16(a,b) 31 #define u16x8_sub_saturate(a,b) vsubq_u16(a,b) 32 #define i16x8_sub_saturate(a,b) vsubq_s16(a,b) 34 #define u16x8_is_equal(a,b) vceqq_u16(a,b) 35 #define i16x8_is_equal(a,b) vceqq_i16(a,b) 40 u8x16 vall_one = vdupq_n_u8 (0x0);
41 u8x16 res_values = { 0x01, 0x02, 0x04, 0x08,
42 0x10, 0x20, 0x40, 0x80,
43 0x01, 0x02, 0x04, 0x08,
44 0x10, 0x20, 0x40, 0x80
49 vreinterpretq_u8_u16 (vceqq_u16 (input, vreinterpretq_u16_u8 (vall_one)));
50 u8x16 before_merge = vminq_u8 (test_result, res_values);
54 u16x8 merge1 = vpaddlq_u8 (before_merge);
56 u32x4 merge2 = vpaddlq_u16 (merge1);
58 u64x2 merge3 = vpaddlq_u32 (merge2);
60 return (
u32) (vgetq_lane_u64 (merge3, 1) << 8) + vgetq_lane_u64 (merge3, 0);
static u32 u16x8_zero_byte_mask(u16x8 input)