23 #ifndef INCLUDED_volk_32f_accumulator_s32f_a_H
24 #define INCLUDED_volk_32f_accumulator_s32f_a_H
31 #include <xmmintrin.h>
38 static inline void volk_32f_accumulator_s32f_a_sse(
float* result,
const float* inputBuffer,
unsigned int num_points){
39 float returnValue = 0;
40 unsigned int number = 0;
41 const unsigned int quarterPoints = num_points / 4;
43 const float* aPtr = inputBuffer;
46 __m128 accumulator = _mm_setzero_ps();
47 __m128 aVal = _mm_setzero_ps();
49 for(;number < quarterPoints; number++){
50 aVal = _mm_load_ps(aPtr);
51 accumulator = _mm_add_ps(accumulator, aVal);
54 _mm_store_ps(tempBuffer,accumulator);
55 returnValue = tempBuffer[0];
56 returnValue += tempBuffer[1];
57 returnValue += tempBuffer[2];
58 returnValue += tempBuffer[3];
60 number = quarterPoints * 4;
61 for(;number < num_points; number++){
62 returnValue += (*aPtr++);
64 *result = returnValue;
68 #ifdef LV_HAVE_GENERIC
75 static inline void volk_32f_accumulator_s32f_generic(
float* result,
const float* inputBuffer,
unsigned int num_points){
76 const float* aPtr = inputBuffer;
77 unsigned int number = 0;
78 float returnValue = 0;
80 for(;number < num_points; number++){
81 returnValue += (*aPtr++);
83 *result = returnValue;
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:27