71 #ifndef INCLUDED_volk_32f_x2_dot_prod_32f_u_H
72 #define INCLUDED_volk_32f_x2_dot_prod_32f_u_H
78 #ifdef LV_HAVE_GENERIC
84 unsigned int num_points)
88 const float* aPtr = input;
89 const float* bPtr = taps;
90 unsigned int number = 0;
92 for (number = 0; number < num_points; number++) {
93 dotProduct += ((*aPtr++) * (*bPtr++));
108 unsigned int num_points)
111 unsigned int number = 0;
112 const unsigned int sixteenthPoints = num_points / 16;
114 float dotProduct = 0;
115 const float* aPtr = input;
116 const float* bPtr = taps;
118 __m128 a0Val, a1Val, a2Val, a3Val;
119 __m128 b0Val, b1Val, b2Val, b3Val;
120 __m128 c0Val, c1Val, c2Val, c3Val;
122 __m128 dotProdVal0 = _mm_setzero_ps();
123 __m128 dotProdVal1 = _mm_setzero_ps();
124 __m128 dotProdVal2 = _mm_setzero_ps();
125 __m128 dotProdVal3 = _mm_setzero_ps();
127 for (; number < sixteenthPoints; number++) {
129 a0Val = _mm_loadu_ps(aPtr);
130 a1Val = _mm_loadu_ps(aPtr + 4);
131 a2Val = _mm_loadu_ps(aPtr + 8);
132 a3Val = _mm_loadu_ps(aPtr + 12);
133 b0Val = _mm_loadu_ps(bPtr);
134 b1Val = _mm_loadu_ps(bPtr + 4);
135 b2Val = _mm_loadu_ps(bPtr + 8);
136 b3Val = _mm_loadu_ps(bPtr + 12);
138 c0Val = _mm_mul_ps(a0Val, b0Val);
139 c1Val = _mm_mul_ps(a1Val, b1Val);
140 c2Val = _mm_mul_ps(a2Val, b2Val);
141 c3Val = _mm_mul_ps(a3Val, b3Val);
143 dotProdVal0 = _mm_add_ps(c0Val, dotProdVal0);
144 dotProdVal1 = _mm_add_ps(c1Val, dotProdVal1);
145 dotProdVal2 = _mm_add_ps(c2Val, dotProdVal2);
146 dotProdVal3 = _mm_add_ps(c3Val, dotProdVal3);
152 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal1);
153 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal2);
154 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal3);
158 _mm_store_ps(dotProductVector,
161 dotProduct = dotProductVector[0];
162 dotProduct += dotProductVector[1];
163 dotProduct += dotProductVector[2];
164 dotProduct += dotProductVector[3];
166 number = sixteenthPoints * 16;
167 for (; number < num_points; number++) {
168 dotProduct += ((*aPtr++) * (*bPtr++));
171 *result = dotProduct;
178 #include <pmmintrin.h>
183 unsigned int num_points)
185 unsigned int number = 0;
186 const unsigned int sixteenthPoints = num_points / 16;
188 float dotProduct = 0;
189 const float* aPtr = input;
190 const float* bPtr = taps;
192 __m128 a0Val, a1Val, a2Val, a3Val;
193 __m128 b0Val, b1Val, b2Val, b3Val;
194 __m128 c0Val, c1Val, c2Val, c3Val;
196 __m128 dotProdVal0 = _mm_setzero_ps();
197 __m128 dotProdVal1 = _mm_setzero_ps();
198 __m128 dotProdVal2 = _mm_setzero_ps();
199 __m128 dotProdVal3 = _mm_setzero_ps();
201 for (; number < sixteenthPoints; number++) {
203 a0Val = _mm_loadu_ps(aPtr);
204 a1Val = _mm_loadu_ps(aPtr + 4);
205 a2Val = _mm_loadu_ps(aPtr + 8);
206 a3Val = _mm_loadu_ps(aPtr + 12);
207 b0Val = _mm_loadu_ps(bPtr);
208 b1Val = _mm_loadu_ps(bPtr + 4);
209 b2Val = _mm_loadu_ps(bPtr + 8);
210 b3Val = _mm_loadu_ps(bPtr + 12);
212 c0Val = _mm_mul_ps(a0Val, b0Val);
213 c1Val = _mm_mul_ps(a1Val, b1Val);
214 c2Val = _mm_mul_ps(a2Val, b2Val);
215 c3Val = _mm_mul_ps(a3Val, b3Val);
217 dotProdVal0 = _mm_add_ps(dotProdVal0, c0Val);
218 dotProdVal1 = _mm_add_ps(dotProdVal1, c1Val);
219 dotProdVal2 = _mm_add_ps(dotProdVal2, c2Val);
220 dotProdVal3 = _mm_add_ps(dotProdVal3, c3Val);
226 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal1);
227 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal2);
228 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal3);
231 _mm_store_ps(dotProductVector,
234 dotProduct = dotProductVector[0];
235 dotProduct += dotProductVector[1];
236 dotProduct += dotProductVector[2];
237 dotProduct += dotProductVector[3];
239 number = sixteenthPoints * 16;
240 for (; number < num_points; number++) {
241 dotProduct += ((*aPtr++) * (*bPtr++));
244 *result = dotProduct;
249 #ifdef LV_HAVE_SSE4_1
251 #include <smmintrin.h>
253 static inline void volk_32f_x2_dot_prod_32f_u_sse4_1(
float* result,
256 unsigned int num_points)
258 unsigned int number = 0;
259 const unsigned int sixteenthPoints = num_points / 16;
261 float dotProduct = 0;
262 const float* aPtr = input;
263 const float* bPtr = taps;
265 __m128 aVal1, bVal1, cVal1;
266 __m128 aVal2, bVal2, cVal2;
267 __m128 aVal3, bVal3, cVal3;
268 __m128 aVal4, bVal4, cVal4;
270 __m128 dotProdVal = _mm_setzero_ps();
272 for (; number < sixteenthPoints; number++) {
274 aVal1 = _mm_loadu_ps(aPtr);
276 aVal2 = _mm_loadu_ps(aPtr);
278 aVal3 = _mm_loadu_ps(aPtr);
280 aVal4 = _mm_loadu_ps(aPtr);
283 bVal1 = _mm_loadu_ps(bPtr);
285 bVal2 = _mm_loadu_ps(bPtr);
287 bVal3 = _mm_loadu_ps(bPtr);
289 bVal4 = _mm_loadu_ps(bPtr);
292 cVal1 = _mm_dp_ps(aVal1, bVal1, 0xF1);
293 cVal2 = _mm_dp_ps(aVal2, bVal2, 0xF2);
294 cVal3 = _mm_dp_ps(aVal3, bVal3, 0xF4);
295 cVal4 = _mm_dp_ps(aVal4, bVal4, 0xF8);
297 cVal1 = _mm_or_ps(cVal1, cVal2);
298 cVal3 = _mm_or_ps(cVal3, cVal4);
299 cVal1 = _mm_or_ps(cVal1, cVal3);
301 dotProdVal = _mm_add_ps(dotProdVal, cVal1);
305 _mm_store_ps(dotProductVector,
308 dotProduct = dotProductVector[0];
309 dotProduct += dotProductVector[1];
310 dotProduct += dotProductVector[2];
311 dotProduct += dotProductVector[3];
313 number = sixteenthPoints * 16;
314 for (; number < num_points; number++) {
315 dotProduct += ((*aPtr++) * (*bPtr++));
318 *result = dotProduct;
325 #include <immintrin.h>
330 unsigned int num_points)
333 unsigned int number = 0;
334 const unsigned int sixteenthPoints = num_points / 16;
336 float dotProduct = 0;
337 const float* aPtr = input;
338 const float* bPtr = taps;
344 __m256 dotProdVal0 = _mm256_setzero_ps();
345 __m256 dotProdVal1 = _mm256_setzero_ps();
347 for (; number < sixteenthPoints; number++) {
349 a0Val = _mm256_loadu_ps(aPtr);
350 a1Val = _mm256_loadu_ps(aPtr + 8);
351 b0Val = _mm256_loadu_ps(bPtr);
352 b1Val = _mm256_loadu_ps(bPtr + 8);
354 c0Val = _mm256_mul_ps(a0Val, b0Val);
355 c1Val = _mm256_mul_ps(a1Val, b1Val);
357 dotProdVal0 = _mm256_add_ps(c0Val, dotProdVal0);
358 dotProdVal1 = _mm256_add_ps(c1Val, dotProdVal1);
364 dotProdVal0 = _mm256_add_ps(dotProdVal0, dotProdVal1);
368 _mm256_storeu_ps(dotProductVector,
371 dotProduct = dotProductVector[0];
372 dotProduct += dotProductVector[1];
373 dotProduct += dotProductVector[2];
374 dotProduct += dotProductVector[3];
375 dotProduct += dotProductVector[4];
376 dotProduct += dotProductVector[5];
377 dotProduct += dotProductVector[6];
378 dotProduct += dotProductVector[7];
380 number = sixteenthPoints * 16;
381 for (; number < num_points; number++) {
382 dotProduct += ((*aPtr++) * (*bPtr++));
385 *result = dotProduct;
390 #if LV_HAVE_AVX2 && LV_HAVE_FMA
391 #include <immintrin.h>
392 static inline void volk_32f_x2_dot_prod_32f_u_avx2_fma(
float* result,
395 unsigned int num_points)
398 const unsigned int eighthPoints = num_points / 8;
400 const float* aPtr = input;
401 const float* bPtr = taps;
403 __m256 dotProdVal = _mm256_setzero_ps();
406 for (number = 0; number < eighthPoints; number++) {
408 aVal1 = _mm256_loadu_ps(aPtr);
409 bVal1 = _mm256_loadu_ps(bPtr);
413 dotProdVal = _mm256_fmadd_ps(aVal1, bVal1, dotProdVal);
417 _mm256_storeu_ps(dotProductVector,
420 float dotProduct = dotProductVector[0] + dotProductVector[1] + dotProductVector[2] +
421 dotProductVector[3] + dotProductVector[4] + dotProductVector[5] +
422 dotProductVector[6] + dotProductVector[7];
424 for (number = eighthPoints * 8; number < num_points; number++) {
425 dotProduct += ((*aPtr++) * (*bPtr++));
428 *result = dotProduct;
433 #include <immintrin.h>
434 static inline void volk_32f_x2_dot_prod_32f_u_avx512f(
float* result,
437 unsigned int num_points)
440 const unsigned int sixteenthPoints = num_points / 16;
442 const float* aPtr = input;
443 const float* bPtr = taps;
445 __m512 dotProdVal = _mm512_setzero_ps();
448 for (number = 0; number < sixteenthPoints; number++) {
450 aVal1 = _mm512_loadu_ps(aPtr);
451 bVal1 = _mm512_loadu_ps(bPtr);
455 dotProdVal = _mm512_fmadd_ps(aVal1, bVal1, dotProdVal);
459 _mm512_storeu_ps(dotProductVector,
462 float dotProduct = dotProductVector[0] + dotProductVector[1] + dotProductVector[2] +
463 dotProductVector[3] + dotProductVector[4] + dotProductVector[5] +
464 dotProductVector[6] + dotProductVector[7] + dotProductVector[8] +
465 dotProductVector[9] + dotProductVector[10] + dotProductVector[11] +
466 dotProductVector[12] + dotProductVector[13] +
467 dotProductVector[14] + dotProductVector[15];
469 for (number = sixteenthPoints * 16; number < num_points; number++) {
470 dotProduct += ((*aPtr++) * (*bPtr++));
473 *result = dotProduct;
479 #ifndef INCLUDED_volk_32f_x2_dot_prod_32f_a_H
480 #define INCLUDED_volk_32f_x2_dot_prod_32f_a_H
486 #ifdef LV_HAVE_GENERIC
492 unsigned int num_points)
495 float dotProduct = 0;
496 const float* aPtr = input;
497 const float* bPtr = taps;
498 unsigned int number = 0;
500 for (number = 0; number < num_points; number++) {
501 dotProduct += ((*aPtr++) * (*bPtr++));
504 *result = dotProduct;
516 unsigned int num_points)
519 unsigned int number = 0;
520 const unsigned int sixteenthPoints = num_points / 16;
522 float dotProduct = 0;
523 const float* aPtr = input;
524 const float* bPtr = taps;
526 __m128 a0Val, a1Val, a2Val, a3Val;
527 __m128 b0Val, b1Val, b2Val, b3Val;
528 __m128 c0Val, c1Val, c2Val, c3Val;
530 __m128 dotProdVal0 = _mm_setzero_ps();
531 __m128 dotProdVal1 = _mm_setzero_ps();
532 __m128 dotProdVal2 = _mm_setzero_ps();
533 __m128 dotProdVal3 = _mm_setzero_ps();
535 for (; number < sixteenthPoints; number++) {
537 a0Val = _mm_load_ps(aPtr);
538 a1Val = _mm_load_ps(aPtr + 4);
539 a2Val = _mm_load_ps(aPtr + 8);
540 a3Val = _mm_load_ps(aPtr + 12);
541 b0Val = _mm_load_ps(bPtr);
542 b1Val = _mm_load_ps(bPtr + 4);
543 b2Val = _mm_load_ps(bPtr + 8);
544 b3Val = _mm_load_ps(bPtr + 12);
546 c0Val = _mm_mul_ps(a0Val, b0Val);
547 c1Val = _mm_mul_ps(a1Val, b1Val);
548 c2Val = _mm_mul_ps(a2Val, b2Val);
549 c3Val = _mm_mul_ps(a3Val, b3Val);
551 dotProdVal0 = _mm_add_ps(c0Val, dotProdVal0);
552 dotProdVal1 = _mm_add_ps(c1Val, dotProdVal1);
553 dotProdVal2 = _mm_add_ps(c2Val, dotProdVal2);
554 dotProdVal3 = _mm_add_ps(c3Val, dotProdVal3);
560 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal1);
561 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal2);
562 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal3);
566 _mm_store_ps(dotProductVector,
569 dotProduct = dotProductVector[0];
570 dotProduct += dotProductVector[1];
571 dotProduct += dotProductVector[2];
572 dotProduct += dotProductVector[3];
574 number = sixteenthPoints * 16;
575 for (; number < num_points; number++) {
576 dotProduct += ((*aPtr++) * (*bPtr++));
579 *result = dotProduct;
586 #include <pmmintrin.h>
591 unsigned int num_points)
593 unsigned int number = 0;
594 const unsigned int sixteenthPoints = num_points / 16;
596 float dotProduct = 0;
597 const float* aPtr = input;
598 const float* bPtr = taps;
600 __m128 a0Val, a1Val, a2Val, a3Val;
601 __m128 b0Val, b1Val, b2Val, b3Val;
602 __m128 c0Val, c1Val, c2Val, c3Val;
604 __m128 dotProdVal0 = _mm_setzero_ps();
605 __m128 dotProdVal1 = _mm_setzero_ps();
606 __m128 dotProdVal2 = _mm_setzero_ps();
607 __m128 dotProdVal3 = _mm_setzero_ps();
609 for (; number < sixteenthPoints; number++) {
611 a0Val = _mm_load_ps(aPtr);
612 a1Val = _mm_load_ps(aPtr + 4);
613 a2Val = _mm_load_ps(aPtr + 8);
614 a3Val = _mm_load_ps(aPtr + 12);
615 b0Val = _mm_load_ps(bPtr);
616 b1Val = _mm_load_ps(bPtr + 4);
617 b2Val = _mm_load_ps(bPtr + 8);
618 b3Val = _mm_load_ps(bPtr + 12);
620 c0Val = _mm_mul_ps(a0Val, b0Val);
621 c1Val = _mm_mul_ps(a1Val, b1Val);
622 c2Val = _mm_mul_ps(a2Val, b2Val);
623 c3Val = _mm_mul_ps(a3Val, b3Val);
625 dotProdVal0 = _mm_add_ps(dotProdVal0, c0Val);
626 dotProdVal1 = _mm_add_ps(dotProdVal1, c1Val);
627 dotProdVal2 = _mm_add_ps(dotProdVal2, c2Val);
628 dotProdVal3 = _mm_add_ps(dotProdVal3, c3Val);
634 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal1);
635 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal2);
636 dotProdVal0 = _mm_add_ps(dotProdVal0, dotProdVal3);
639 _mm_store_ps(dotProductVector,
642 dotProduct = dotProductVector[0];
643 dotProduct += dotProductVector[1];
644 dotProduct += dotProductVector[2];
645 dotProduct += dotProductVector[3];
647 number = sixteenthPoints * 16;
648 for (; number < num_points; number++) {
649 dotProduct += ((*aPtr++) * (*bPtr++));
652 *result = dotProduct;
657 #ifdef LV_HAVE_SSE4_1
659 #include <smmintrin.h>
661 static inline void volk_32f_x2_dot_prod_32f_a_sse4_1(
float* result,
664 unsigned int num_points)
666 unsigned int number = 0;
667 const unsigned int sixteenthPoints = num_points / 16;
669 float dotProduct = 0;
670 const float* aPtr = input;
671 const float* bPtr = taps;
673 __m128 aVal1, bVal1, cVal1;
674 __m128 aVal2, bVal2, cVal2;
675 __m128 aVal3, bVal3, cVal3;
676 __m128 aVal4, bVal4, cVal4;
678 __m128 dotProdVal = _mm_setzero_ps();
680 for (; number < sixteenthPoints; number++) {
682 aVal1 = _mm_load_ps(aPtr);
684 aVal2 = _mm_load_ps(aPtr);
686 aVal3 = _mm_load_ps(aPtr);
688 aVal4 = _mm_load_ps(aPtr);
691 bVal1 = _mm_load_ps(bPtr);
693 bVal2 = _mm_load_ps(bPtr);
695 bVal3 = _mm_load_ps(bPtr);
697 bVal4 = _mm_load_ps(bPtr);
700 cVal1 = _mm_dp_ps(aVal1, bVal1, 0xF1);
701 cVal2 = _mm_dp_ps(aVal2, bVal2, 0xF2);
702 cVal3 = _mm_dp_ps(aVal3, bVal3, 0xF4);
703 cVal4 = _mm_dp_ps(aVal4, bVal4, 0xF8);
705 cVal1 = _mm_or_ps(cVal1, cVal2);
706 cVal3 = _mm_or_ps(cVal3, cVal4);
707 cVal1 = _mm_or_ps(cVal1, cVal3);
709 dotProdVal = _mm_add_ps(dotProdVal, cVal1);
713 _mm_store_ps(dotProductVector,
716 dotProduct = dotProductVector[0];
717 dotProduct += dotProductVector[1];
718 dotProduct += dotProductVector[2];
719 dotProduct += dotProductVector[3];
721 number = sixteenthPoints * 16;
722 for (; number < num_points; number++) {
723 dotProduct += ((*aPtr++) * (*bPtr++));
726 *result = dotProduct;
733 #include <immintrin.h>
738 unsigned int num_points)
741 unsigned int number = 0;
742 const unsigned int sixteenthPoints = num_points / 16;
744 float dotProduct = 0;
745 const float* aPtr = input;
746 const float* bPtr = taps;
752 __m256 dotProdVal0 = _mm256_setzero_ps();
753 __m256 dotProdVal1 = _mm256_setzero_ps();
755 for (; number < sixteenthPoints; number++) {
757 a0Val = _mm256_load_ps(aPtr);
758 a1Val = _mm256_load_ps(aPtr + 8);
759 b0Val = _mm256_load_ps(bPtr);
760 b1Val = _mm256_load_ps(bPtr + 8);
762 c0Val = _mm256_mul_ps(a0Val, b0Val);
763 c1Val = _mm256_mul_ps(a1Val, b1Val);
765 dotProdVal0 = _mm256_add_ps(c0Val, dotProdVal0);
766 dotProdVal1 = _mm256_add_ps(c1Val, dotProdVal1);
772 dotProdVal0 = _mm256_add_ps(dotProdVal0, dotProdVal1);
776 _mm256_store_ps(dotProductVector,
779 dotProduct = dotProductVector[0];
780 dotProduct += dotProductVector[1];
781 dotProduct += dotProductVector[2];
782 dotProduct += dotProductVector[3];
783 dotProduct += dotProductVector[4];
784 dotProduct += dotProductVector[5];
785 dotProduct += dotProductVector[6];
786 dotProduct += dotProductVector[7];
788 number = sixteenthPoints * 16;
789 for (; number < num_points; number++) {
790 dotProduct += ((*aPtr++) * (*bPtr++));
793 *result = dotProduct;
798 #if LV_HAVE_AVX2 && LV_HAVE_FMA
799 #include <immintrin.h>
800 static inline void volk_32f_x2_dot_prod_32f_a_avx2_fma(
float* result,
803 unsigned int num_points)
806 const unsigned int eighthPoints = num_points / 8;
808 const float* aPtr = input;
809 const float* bPtr = taps;
811 __m256 dotProdVal = _mm256_setzero_ps();
814 for (number = 0; number < eighthPoints; number++) {
816 aVal1 = _mm256_load_ps(aPtr);
817 bVal1 = _mm256_load_ps(bPtr);
821 dotProdVal = _mm256_fmadd_ps(aVal1, bVal1, dotProdVal);
825 _mm256_store_ps(dotProductVector,
828 float dotProduct = dotProductVector[0] + dotProductVector[1] + dotProductVector[2] +
829 dotProductVector[3] + dotProductVector[4] + dotProductVector[5] +
830 dotProductVector[6] + dotProductVector[7];
832 for (number = eighthPoints * 8; number < num_points; number++) {
833 dotProduct += ((*aPtr++) * (*bPtr++));
836 *result = dotProduct;
841 #include <immintrin.h>
842 static inline void volk_32f_x2_dot_prod_32f_a_avx512f(
float* result,
845 unsigned int num_points)
848 const unsigned int sixteenthPoints = num_points / 16;
850 const float* aPtr = input;
851 const float* bPtr = taps;
853 __m512 dotProdVal = _mm512_setzero_ps();
856 for (number = 0; number < sixteenthPoints; number++) {
858 aVal1 = _mm512_load_ps(aPtr);
859 bVal1 = _mm512_load_ps(bPtr);
863 dotProdVal = _mm512_fmadd_ps(aVal1, bVal1, dotProdVal);
867 _mm512_store_ps(dotProductVector,
870 float dotProduct = dotProductVector[0] + dotProductVector[1] + dotProductVector[2] +
871 dotProductVector[3] + dotProductVector[4] + dotProductVector[5] +
872 dotProductVector[6] + dotProductVector[7] + dotProductVector[8] +
873 dotProductVector[9] + dotProductVector[10] + dotProductVector[11] +
874 dotProductVector[12] + dotProductVector[13] +
875 dotProductVector[14] + dotProductVector[15];
877 for (number = sixteenthPoints * 16; number < num_points; number++) {
878 dotProduct += ((*aPtr++) * (*bPtr++));
881 *result = dotProduct;
886 #include <arm_neon.h>
891 unsigned int num_points)
894 unsigned int quarter_points = num_points / 16;
895 float dotProduct = 0;
896 const float* aPtr = input;
897 const float* bPtr = taps;
898 unsigned int number = 0;
900 float32x4x4_t a_val, b_val, accumulator0;
901 accumulator0.val[0] = vdupq_n_f32(0);
902 accumulator0.val[1] = vdupq_n_f32(0);
903 accumulator0.val[2] = vdupq_n_f32(0);
904 accumulator0.val[3] = vdupq_n_f32(0);
907 for (number = 0; number < quarter_points; ++number) {
908 a_val = vld4q_f32(aPtr);
909 b_val = vld4q_f32(bPtr);
910 accumulator0.val[0] = vmlaq_f32(accumulator0.val[0], a_val.val[0], b_val.val[0]);
911 accumulator0.val[1] = vmlaq_f32(accumulator0.val[1], a_val.val[1], b_val.val[1]);
912 accumulator0.val[2] = vmlaq_f32(accumulator0.val[2], a_val.val[2], b_val.val[2]);
913 accumulator0.val[3] = vmlaq_f32(accumulator0.val[3], a_val.val[3], b_val.val[3]);
917 accumulator0.val[0] = vaddq_f32(accumulator0.val[0], accumulator0.val[1]);
918 accumulator0.val[2] = vaddq_f32(accumulator0.val[2], accumulator0.val[3]);
919 accumulator0.val[0] = vaddq_f32(accumulator0.val[2], accumulator0.val[0]);
921 vst1q_f32(accumulator, accumulator0.val[0]);
922 dotProduct = accumulator[0] + accumulator[1] + accumulator[2] + accumulator[3];
924 for (number = quarter_points * 16; number < num_points; number++) {
925 dotProduct += ((*aPtr++) * (*bPtr++));
928 *result = dotProduct;
938 unsigned int num_points)
941 unsigned int quarter_points = num_points / 8;
942 float dotProduct = 0;
943 const float* aPtr = input;
944 const float* bPtr = taps;
945 unsigned int number = 0;
947 float32x4x2_t a_val, b_val, accumulator_val;
948 accumulator_val.val[0] = vdupq_n_f32(0);
949 accumulator_val.val[1] = vdupq_n_f32(0);
951 for (number = 0; number < quarter_points; ++number) {
952 a_val = vld2q_f32(aPtr);
953 b_val = vld2q_f32(bPtr);
954 accumulator_val.val[0] =
955 vmlaq_f32(accumulator_val.val[0], a_val.val[0], b_val.val[0]);
956 accumulator_val.val[1] =
957 vmlaq_f32(accumulator_val.val[1], a_val.val[1], b_val.val[1]);
961 accumulator_val.val[0] = vaddq_f32(accumulator_val.val[0], accumulator_val.val[1]);
963 vst1q_f32(accumulator, accumulator_val.val[0]);
964 dotProduct = accumulator[0] + accumulator[1] + accumulator[2] + accumulator[3];
966 for (number = quarter_points * 8; number < num_points; number++) {
967 dotProduct += ((*aPtr++) * (*bPtr++));
970 *result = dotProduct;
975 #ifdef LV_HAVE_NEONV7
976 extern void volk_32f_x2_dot_prod_32f_a_neonasm(
float* cVector,
977 const float* aVector,
978 const float* bVector,
979 unsigned int num_points);
982 #ifdef LV_HAVE_NEONV7
983 extern void volk_32f_x2_dot_prod_32f_a_neonasm_opts(
float* cVector,
984 const float* aVector,
985 const float* bVector,
986 unsigned int num_points);
static void volk_32f_x2_dot_prod_32f_a_avx(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:735
static void volk_32f_x2_dot_prod_32f_a_sse(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:513
static void volk_32f_x2_dot_prod_32f_u_sse(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:105
static void volk_32f_x2_dot_prod_32f_u_avx(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:327
static void volk_32f_x2_dot_prod_32f_generic(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:81
static void volk_32f_x2_dot_prod_32f_u_sse3(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:180
static void volk_32f_x2_dot_prod_32f_a_generic(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:489
static void volk_32f_x2_dot_prod_32f_a_sse3(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:588
static void volk_32f_x2_dot_prod_32f_neonopts(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:888
static void volk_32f_x2_dot_prod_32f_neon(float *result, const float *input, const float *taps, unsigned int num_points)
Definition: volk_32f_x2_dot_prod_32f.h:935
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:56