69 #ifndef INCLUDED_volk_32f_s32f_multiply_32f_u_H 70 #define INCLUDED_volk_32f_s32f_multiply_32f_u_H 76 #include <xmmintrin.h> 80 const float scalar,
unsigned int num_points)
82 unsigned int number = 0;
83 const unsigned int quarterPoints = num_points / 4;
85 float* cPtr = cVector;
86 const float* aPtr = aVector;
88 __m128 aVal, bVal, cVal;
89 bVal = _mm_set_ps1(scalar);
90 for(;number < quarterPoints; number++){
91 aVal = _mm_loadu_ps(aPtr);
93 cVal = _mm_mul_ps(aVal, bVal);
95 _mm_storeu_ps(cPtr,cVal);
101 number = quarterPoints * 4;
102 for(;number < num_points; number++){
103 *cPtr++ = (*aPtr++) * scalar;
109 #include <immintrin.h> 113 const float scalar,
unsigned int num_points)
115 unsigned int number = 0;
116 const unsigned int eighthPoints = num_points / 8;
118 float* cPtr = cVector;
119 const float* aPtr = aVector;
121 __m256 aVal, bVal, cVal;
122 bVal = _mm256_set1_ps(scalar);
123 for(;number < eighthPoints; number++){
125 aVal = _mm256_loadu_ps(aPtr);
127 cVal = _mm256_mul_ps(aVal, bVal);
129 _mm256_storeu_ps(cPtr,cVal);
135 number = eighthPoints * 8;
136 for(;number < num_points; number++){
137 *cPtr++ = (*aPtr++) * scalar;
142 #ifdef LV_HAVE_GENERIC 146 const float scalar,
unsigned int num_points)
148 unsigned int number = 0;
149 const float* inputPtr = aVector;
150 float* outputPtr = cVector;
151 for(number = 0; number < num_points; number++){
152 *outputPtr = (*inputPtr) * scalar;
162 #ifndef INCLUDED_volk_32f_s32f_multiply_32f_a_H 163 #define INCLUDED_volk_32f_s32f_multiply_32f_a_H 165 #include <inttypes.h> 169 #include <xmmintrin.h> 173 const float scalar,
unsigned int num_points)
175 unsigned int number = 0;
176 const unsigned int quarterPoints = num_points / 4;
178 float* cPtr = cVector;
179 const float* aPtr = aVector;
181 __m128 aVal, bVal, cVal;
182 bVal = _mm_set_ps1(scalar);
183 for(;number < quarterPoints; number++){
184 aVal = _mm_load_ps(aPtr);
186 cVal = _mm_mul_ps(aVal, bVal);
188 _mm_store_ps(cPtr,cVal);
194 number = quarterPoints * 4;
195 for(;number < num_points; number++){
196 *cPtr++ = (*aPtr++) * scalar;
202 #include <immintrin.h> 206 const float scalar,
unsigned int num_points)
208 unsigned int number = 0;
209 const unsigned int eighthPoints = num_points / 8;
211 float* cPtr = cVector;
212 const float* aPtr = aVector;
214 __m256 aVal, bVal, cVal;
215 bVal = _mm256_set1_ps(scalar);
216 for(;number < eighthPoints; number++){
217 aVal = _mm256_load_ps(aPtr);
219 cVal = _mm256_mul_ps(aVal, bVal);
221 _mm256_store_ps(cPtr,cVal);
227 number = eighthPoints * 8;
228 for(;number < num_points; number++){
229 *cPtr++ = (*aPtr++) * scalar;
235 #include <arm_neon.h> 239 const float scalar,
unsigned int num_points)
241 unsigned int number = 0;
242 const float* inputPtr = aVector;
243 float* outputPtr = cVector;
244 const unsigned int quarterPoints = num_points / 4;
246 float32x4_t aVal, cVal;
248 for(number = 0; number < quarterPoints; number++){
249 aVal = vld1q_f32(inputPtr);
250 cVal = vmulq_n_f32 (aVal, scalar);
251 vst1q_f32(outputPtr, cVal);
255 for(number = quarterPoints * 4; number < num_points; number++){
256 *outputPtr++ = (*inputPtr++) * scalar;
262 #ifdef LV_HAVE_GENERIC 266 const float scalar,
unsigned int num_points)
268 unsigned int number = 0;
269 const float* inputPtr = aVector;
270 float* outputPtr = cVector;
271 for(number = 0; number < num_points; number++){
272 *outputPtr = (*inputPtr) * scalar;
283 volk_32f_s32f_multiply_32f_a_orc_impl(
float* dst,
const float* src,
284 const float scalar,
unsigned int num_points);
287 volk_32f_s32f_multiply_32f_u_orc(
float* cVector,
const float* aVector,
288 const float scalar,
unsigned int num_points)
290 volk_32f_s32f_multiply_32f_a_orc_impl(cVector, aVector, scalar, num_points);
static void volk_32f_s32f_multiply_32f_a_avx(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:205
static void volk_32f_s32f_multiply_32f_generic(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:145
static void volk_32f_s32f_multiply_32f_u_sse(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:79
static void volk_32f_s32f_multiply_32f_a_generic(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:265
static void volk_32f_s32f_multiply_32f_a_sse(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:172
static void volk_32f_s32f_multiply_32f_u_neon(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:238
static void volk_32f_s32f_multiply_32f_u_avx(float *cVector, const float *aVector, const float scalar, unsigned int num_points)
Definition: volk_32f_s32f_multiply_32f.h:112