24 #ifndef ARM_COMPUTE_WRAPPER_ADD_H
25 #define ARM_COMPUTE_WRAPPER_ADD_H
33 #define VADD_IMPL(stype, vtype, prefix, postfix) \
34 inline vtype vadd(const vtype &a, const vtype &b) \
36 return prefix##_##postfix(a, b); \
48 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
50 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
61 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
62 VADD_IMPL(float16x8_t, float16x8_t, vaddq, f16)
63 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
67 #define VQADD_IMPL(stype, vtype, prefix, postfix) \
68 inline vtype vqadd(const vtype &a, const vtype &b) \
70 return prefix##_##postfix(a, b); \
82 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
84 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
95 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
96 VQADD_IMPL(float16x8_t, float16x8_t, vaddq, f16)
97 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
101 #define VADDW_IMPL(wtype, vtype, prefix, postfix) \
102 inline wtype vaddw(const wtype &a, const vtype &b) \
104 return prefix##_##postfix(a, b); \
116 #define VADDL_IMPL(wtype, vtype, prefix, postfix) \
117 inline wtype vaddl(const vtype &a, const vtype &b) \
119 return prefix##_##postfix(a, b); \
130 #if defined(__aarch64__)
132 #define VADDV_IMPL(stype, vtype, prefix, postfix) \
133 inline stype vaddv(const vtype &a) \
135 return prefix##_##postfix(a); \
138 VADDV_IMPL(uint8_t, uint8x8_t, vaddv, u8)
139 VADDV_IMPL(int8_t, int8x8_t, vaddv, s8)
140 VADDV_IMPL(uint16_t, uint16x4_t, vaddv, u16)
141 VADDV_IMPL(int16_t, int16x4_t, vaddv, s16)
142 VADDV_IMPL(uint32_t, uint32x2_t, vaddv, u32)
143 VADDV_IMPL(int32_t, int32x2_t, vaddv, s32)
144 VADDV_IMPL(
float, float32x2_t, vaddv, f32)
146 VADDV_IMPL(uint8_t, uint8x16_t, vaddvq, u8)
147 VADDV_IMPL(int8_t, int8x16_t, vaddvq, s8)
148 VADDV_IMPL(uint16_t, uint16x8_t, vaddvq, u16)
149 VADDV_IMPL(int16_t, int16x8_t, vaddvq, s16)
150 VADDV_IMPL(uint32_t, uint32x4_t, vaddvq, u32)
151 VADDV_IMPL(int32_t, int32x4_t, vaddvq, s32)
152 VADDV_IMPL(uint64_t, uint64x2_t, vaddvq, u64)
153 VADDV_IMPL(int64_t, int64x2_t, vaddvq, s64)
154 VADDV_IMPL(
float, float32x4_t, vaddvq, f32)
156 #endif // defined(__aarch64__)
159 #define VPADDL_IMPL(ltype, vtype, prefix, postfix) \
160 inline ltype vpaddl(const vtype &a) \
162 return prefix##_##postfix(a); \
181 #define VPADD_IMPL(stype, vtype, prefix, postfix) \
182 inline vtype vpadd(const vtype &a, const vtype &b) \
184 return prefix##_##postfix(a, b); \
194 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
196 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC