63 #ifndef INCLUDED_volk_32f_accumulator_s32f_a_H
64 #define INCLUDED_volk_32f_accumulator_s32f_a_H
72 #include <xmmintrin.h>
75 volk_32f_accumulator_s32f_a_sse(
float* result,
const float* inputBuffer,
unsigned int num_points)
77 float returnValue = 0;
78 unsigned int number = 0;
79 const unsigned int quarterPoints = num_points / 4;
81 const float* aPtr = inputBuffer;
84 __m128 accumulator = _mm_setzero_ps();
85 __m128 aVal = _mm_setzero_ps();
87 for(;number < quarterPoints; number++){
88 aVal = _mm_load_ps(aPtr);
89 accumulator = _mm_add_ps(accumulator, aVal);
93 _mm_store_ps(tempBuffer,accumulator);
95 returnValue = tempBuffer[0];
96 returnValue += tempBuffer[1];
97 returnValue += tempBuffer[2];
98 returnValue += tempBuffer[3];
100 number = quarterPoints * 4;
101 for(;number < num_points; number++){
102 returnValue += (*aPtr++);
104 *result = returnValue;
111 #ifdef LV_HAVE_GENERIC
114 volk_32f_accumulator_s32f_generic(
float* result,
const float* inputBuffer,
unsigned int num_points)
116 const float* aPtr = inputBuffer;
117 unsigned int number = 0;
118 float returnValue = 0;
120 for(;number < num_points; number++){
121 returnValue += (*aPtr++);
123 *result = returnValue;
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:27