68 #ifndef INCLUDED_volk_32i_x2_or_32i_a_H
69 #define INCLUDED_volk_32i_x2_or_32i_a_H
74 #ifdef LV_HAVE_AVX512F
75 #include <immintrin.h>
77 static inline void volk_32i_x2_or_32i_a_avx512f(int32_t* cVector,
78 const int32_t* aVector,
79 const int32_t* bVector,
80 unsigned int num_points)
82 unsigned int number = 0;
83 const unsigned int sixteenthPoints = num_points / 16;
85 int32_t* cPtr = (int32_t*)cVector;
86 const int32_t* aPtr = (int32_t*)aVector;
87 const int32_t* bPtr = (int32_t*)bVector;
89 __m512i aVal, bVal, cVal;
90 for (; number < sixteenthPoints; number++) {
92 aVal = _mm512_load_si512(aPtr);
93 bVal = _mm512_load_si512(bPtr);
95 cVal = _mm512_or_si512(aVal, bVal);
97 _mm512_store_si512(cPtr, cVal);
104 number = sixteenthPoints * 16;
105 for (; number < num_points; number++) {
106 cVector[number] = aVector[number] | bVector[number];
112 #include <immintrin.h>
114 static inline void volk_32i_x2_or_32i_a_avx2(int32_t* cVector,
115 const int32_t* aVector,
116 const int32_t* bVector,
117 unsigned int num_points)
119 unsigned int number = 0;
120 const unsigned int oneEightPoints = num_points / 8;
122 int32_t* cPtr = cVector;
123 const int32_t* aPtr = aVector;
124 const int32_t* bPtr = bVector;
126 __m256i aVal, bVal, cVal;
127 for (; number < oneEightPoints; number++) {
129 aVal = _mm256_load_si256((__m256i*)aPtr);
130 bVal = _mm256_load_si256((__m256i*)bPtr);
132 cVal = _mm256_or_si256(aVal, bVal);
134 _mm256_store_si256((__m256i*)cPtr,
142 number = oneEightPoints * 8;
143 for (; number < num_points; number++) {
144 cVector[number] = aVector[number] | bVector[number];
151 #include <xmmintrin.h>
154 const int32_t* aVector,
155 const int32_t* bVector,
156 unsigned int num_points)
158 unsigned int number = 0;
159 const unsigned int quarterPoints = num_points / 4;
161 float* cPtr = (
float*)cVector;
162 const float* aPtr = (
float*)aVector;
163 const float* bPtr = (
float*)bVector;
166 for (; number < quarterPoints; number++) {
179 number = quarterPoints * 4;
180 for (; number < num_points; number++) {
181 cVector[number] = aVector[number] | bVector[number];
188 #include <arm_neon.h>
191 const int32_t* aVector,
192 const int32_t* bVector,
193 unsigned int num_points)
195 int32_t* cPtr = cVector;
196 const int32_t* aPtr = aVector;
197 const int32_t* bPtr = bVector;
198 unsigned int number = 0;
199 unsigned int quarter_points = num_points / 4;
201 int32x4_t a_val, b_val, c_val;
203 for (number = 0; number < quarter_points; number++) {
204 a_val = vld1q_s32(aPtr);
205 b_val = vld1q_s32(bPtr);
206 c_val = vorrq_s32(a_val, b_val);
207 vst1q_s32(cPtr, c_val);
213 for (number = quarter_points * 4; number < num_points; number++) {
214 *cPtr++ = (*aPtr++) | (*bPtr++);
220 #ifdef LV_HAVE_GENERIC
223 const int32_t* aVector,
224 const int32_t* bVector,
225 unsigned int num_points)
227 int32_t* cPtr = cVector;
228 const int32_t* aPtr = aVector;
229 const int32_t* bPtr = bVector;
230 unsigned int number = 0;
232 for (number = 0; number < num_points; number++) {
233 *cPtr++ = (*aPtr++) | (*bPtr++);
240 extern void volk_32i_x2_or_32i_a_orc_impl(int32_t* cVector,
241 const int32_t* aVector,
242 const int32_t* bVector,
243 unsigned int num_points);
245 static inline void volk_32i_x2_or_32i_u_orc(int32_t* cVector,
246 const int32_t* aVector,
247 const int32_t* bVector,
248 unsigned int num_points)
250 volk_32i_x2_or_32i_a_orc_impl(cVector, aVector, bVector, num_points);
258 #ifndef INCLUDED_volk_32i_x2_or_32i_u_H
259 #define INCLUDED_volk_32i_x2_or_32i_u_H
261 #include <inttypes.h>
264 #ifdef LV_HAVE_AVX512F
265 #include <immintrin.h>
267 static inline void volk_32i_x2_or_32i_u_avx512f(int32_t* cVector,
268 const int32_t* aVector,
269 const int32_t* bVector,
270 unsigned int num_points)
272 unsigned int number = 0;
273 const unsigned int sixteenthPoints = num_points / 16;
275 int32_t* cPtr = (int32_t*)cVector;
276 const int32_t* aPtr = (int32_t*)aVector;
277 const int32_t* bPtr = (int32_t*)bVector;
279 __m512i aVal, bVal, cVal;
280 for (; number < sixteenthPoints; number++) {
282 aVal = _mm512_loadu_si512(aPtr);
283 bVal = _mm512_loadu_si512(bPtr);
285 cVal = _mm512_or_si512(aVal, bVal);
287 _mm512_storeu_si512(cPtr, cVal);
294 number = sixteenthPoints * 16;
295 for (; number < num_points; number++) {
296 cVector[number] = aVector[number] | bVector[number];
302 #include <immintrin.h>
304 static inline void volk_32i_x2_or_32i_u_avx2(int32_t* cVector,
305 const int32_t* aVector,
306 const int32_t* bVector,
307 unsigned int num_points)
309 unsigned int number = 0;
310 const unsigned int oneEightPoints = num_points / 8;
312 int32_t* cPtr = cVector;
313 const int32_t* aPtr = aVector;
314 const int32_t* bPtr = bVector;
316 __m256i aVal, bVal, cVal;
317 for (; number < oneEightPoints; number++) {
319 aVal = _mm256_loadu_si256((__m256i*)aPtr);
320 bVal = _mm256_loadu_si256((__m256i*)bPtr);
322 cVal = _mm256_or_si256(aVal, bVal);
324 _mm256_storeu_si256((__m256i*)cPtr,
332 number = oneEightPoints * 8;
333 for (; number < num_points; number++) {
334 cVector[number] = aVector[number] | bVector[number];
float32x4_t __m128
Definition: sse2neon.h:235
FORCE_INLINE __m128 _mm_load_ps(const float *p)
Definition: sse2neon.h:1858
FORCE_INLINE void _mm_store_ps(float *p, __m128 a)
Definition: sse2neon.h:2704
FORCE_INLINE __m128 _mm_or_ps(__m128, __m128)
Definition: sse2neon.h:2237
static void volk_32i_x2_or_32i_neon(int32_t *cVector, const int32_t *aVector, const int32_t *bVector, unsigned int num_points)
Definition: volk_32i_x2_or_32i.h:190
static void volk_32i_x2_or_32i_generic(int32_t *cVector, const int32_t *aVector, const int32_t *bVector, unsigned int num_points)
Definition: volk_32i_x2_or_32i.h:222
static void volk_32i_x2_or_32i_a_sse(int32_t *cVector, const int32_t *aVector, const int32_t *bVector, unsigned int num_points)
Definition: volk_32i_x2_or_32i.h:153