63 #ifndef INCLUDED_volk_32f_accumulator_s32f_a_H 64 #define INCLUDED_volk_32f_accumulator_s32f_a_H 70 #include <immintrin.h> 75 float returnValue = 0;
76 unsigned int number = 0;
77 const unsigned int eighthPoints = num_points / 8;
79 const float* aPtr = inputBuffer;
82 __m256 accumulator = _mm256_setzero_ps();
83 __m256 aVal = _mm256_setzero_ps();
85 for(;number < eighthPoints; number++){
86 aVal = _mm256_load_ps(aPtr);
87 accumulator = _mm256_add_ps(accumulator, aVal);
91 _mm256_store_ps(tempBuffer, accumulator);
93 returnValue = tempBuffer[0];
94 returnValue += tempBuffer[1];
95 returnValue += tempBuffer[2];
96 returnValue += tempBuffer[3];
97 returnValue += tempBuffer[4];
98 returnValue += tempBuffer[5];
99 returnValue += tempBuffer[6];
100 returnValue += tempBuffer[7];
102 number = eighthPoints * 8;
103 for(;number < num_points; number++){
104 returnValue += (*aPtr++);
106 *result = returnValue;
112 #include <immintrin.h> 117 float returnValue = 0;
118 unsigned int number = 0;
119 const unsigned int eighthPoints = num_points / 8;
121 const float* aPtr = inputBuffer;
124 __m256 accumulator = _mm256_setzero_ps();
125 __m256 aVal = _mm256_setzero_ps();
127 for(;number < eighthPoints; number++){
128 aVal = _mm256_loadu_ps(aPtr);
129 accumulator = _mm256_add_ps(accumulator, aVal);
133 _mm256_store_ps(tempBuffer, accumulator);
135 returnValue = tempBuffer[0];
136 returnValue += tempBuffer[1];
137 returnValue += tempBuffer[2];
138 returnValue += tempBuffer[3];
139 returnValue += tempBuffer[4];
140 returnValue += tempBuffer[5];
141 returnValue += tempBuffer[6];
142 returnValue += tempBuffer[7];
144 number = eighthPoints * 8;
145 for(;number < num_points; number++){
146 returnValue += (*aPtr++);
148 *result = returnValue;
154 #include <xmmintrin.h> 159 float returnValue = 0;
160 unsigned int number = 0;
161 const unsigned int quarterPoints = num_points / 4;
163 const float* aPtr = inputBuffer;
166 __m128 accumulator = _mm_setzero_ps();
167 __m128 aVal = _mm_setzero_ps();
169 for(;number < quarterPoints; number++){
170 aVal = _mm_load_ps(aPtr);
171 accumulator = _mm_add_ps(accumulator, aVal);
175 _mm_store_ps(tempBuffer,accumulator);
177 returnValue = tempBuffer[0];
178 returnValue += tempBuffer[1];
179 returnValue += tempBuffer[2];
180 returnValue += tempBuffer[3];
182 number = quarterPoints * 4;
183 for(;number < num_points; number++){
184 returnValue += (*aPtr++);
186 *result = returnValue;
192 #include <xmmintrin.h> 197 float returnValue = 0;
198 unsigned int number = 0;
199 const unsigned int quarterPoints = num_points / 4;
201 const float* aPtr = inputBuffer;
204 __m128 accumulator = _mm_setzero_ps();
205 __m128 aVal = _mm_setzero_ps();
207 for(;number < quarterPoints; number++){
208 aVal = _mm_load_ps(aPtr);
209 accumulator = _mm_add_ps(accumulator, aVal);
213 _mm_store_ps(tempBuffer,accumulator);
215 returnValue = tempBuffer[0];
216 returnValue += tempBuffer[1];
217 returnValue += tempBuffer[2];
218 returnValue += tempBuffer[3];
220 number = quarterPoints * 4;
221 for(;number < num_points; number++){
222 returnValue += (*aPtr++);
224 *result = returnValue;
228 #ifdef LV_HAVE_GENERIC 232 const float* aPtr = inputBuffer;
233 unsigned int number = 0;
234 float returnValue = 0;
236 for(;number < num_points; number++){
237 returnValue += (*aPtr++);
239 *result = returnValue;
static void volk_32f_accumulator_s32f_u_avx(float *result, const float *inputBuffer, unsigned int num_points)
Definition: volk_32f_accumulator_s32f.h:115
static void volk_32f_accumulator_s32f_a_avx(float *result, const float *inputBuffer, unsigned int num_points)
Definition: volk_32f_accumulator_s32f.h:73
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:33
static void volk_32f_accumulator_s32f_u_sse(float *result, const float *inputBuffer, unsigned int num_points)
Definition: volk_32f_accumulator_s32f.h:195
static void volk_32f_accumulator_s32f_generic(float *result, const float *inputBuffer, unsigned int num_points)
Definition: volk_32f_accumulator_s32f.h:230
static void volk_32f_accumulator_s32f_a_sse(float *result, const float *inputBuffer, unsigned int num_points)
Definition: volk_32f_accumulator_s32f.h:157