1 #ifndef INCLUDED_volk_32f_accumulator_s32f_a_H
2 #define INCLUDED_volk_32f_accumulator_s32f_a_H
16 static inline void volk_32f_accumulator_s32f_a_sse(
float* result,
const float* inputBuffer,
unsigned int num_points){
17 float returnValue = 0;
18 unsigned int number = 0;
19 const unsigned int quarterPoints = num_points / 4;
21 const float* aPtr = inputBuffer;
24 __m128 accumulator = _mm_setzero_ps();
25 __m128 aVal = _mm_setzero_ps();
27 for(;number < quarterPoints; number++){
28 aVal = _mm_load_ps(aPtr);
29 accumulator = _mm_add_ps(accumulator, aVal);
32 _mm_store_ps(tempBuffer,accumulator);
33 returnValue = tempBuffer[0];
34 returnValue += tempBuffer[1];
35 returnValue += tempBuffer[2];
36 returnValue += tempBuffer[3];
38 number = quarterPoints * 4;
39 for(;number < num_points; number++){
40 returnValue += (*aPtr++);
42 *result = returnValue;
46 #ifdef LV_HAVE_GENERIC
53 static inline void volk_32f_accumulator_s32f_generic(
float* result,
const float* inputBuffer,
unsigned int num_points){
54 const float* aPtr = inputBuffer;
55 unsigned int number = 0;
56 float returnValue = 0;
58 for(;number < num_points; number++){
59 returnValue += (*aPtr++);
61 *result = returnValue;
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:27