1 #ifndef INCLUDED_volk_32fc_s32fc_multiply_32fc_u_H
2 #define INCLUDED_volk_32fc_s32fc_multiply_32fc_u_H
10 #include <pmmintrin.h>
18 static inline void volk_32fc_s32fc_multiply_32fc_u_sse3(
lv_32fc_t* cVector,
const lv_32fc_t* aVector,
const lv_32fc_t scalar,
unsigned int num_points){
19 unsigned int number = 0;
20 const unsigned int halfPoints = num_points / 2;
22 __m128 x, yl, yh, z, tmp1, tmp2;
30 for(;number < halfPoints; number++){
32 x = _mm_loadu_ps((
float*)a);
34 tmp1 = _mm_mul_ps(x,yl);
36 x = _mm_shuffle_ps(x,x,0xB1);
38 tmp2 = _mm_mul_ps(x,yh);
40 z = _mm_addsub_ps(tmp1,tmp2);
42 _mm_storeu_ps((
float*)c,z);
48 if((num_points % 2) != 0) {
54 #ifdef LV_HAVE_GENERIC
62 static inline void volk_32fc_s32fc_multiply_32fc_generic(
lv_32fc_t* cVector,
const lv_32fc_t* aVector,
const lv_32fc_t scalar,
unsigned int num_points){
65 unsigned int number = num_points;
69 *cPtr++ = (*aPtr++) * scalar;
70 *cPtr++ = (*aPtr++) * scalar;
71 *cPtr++ = (*aPtr++) * scalar;
72 *cPtr++ = (*aPtr++) * scalar;
73 *cPtr++ = (*aPtr++) * scalar;
74 *cPtr++ = (*aPtr++) * scalar;
75 *cPtr++ = (*aPtr++) * scalar;
76 *cPtr++ = (*aPtr++) * scalar;
82 *cPtr++ = *aPtr++ * scalar;
88 #ifndef INCLUDED_volk_32fc_s32fc_multiply_32fc_a_H
89 #define INCLUDED_volk_32fc_s32fc_multiply_32fc_a_H
97 #include <pmmintrin.h>
105 static inline void volk_32fc_s32fc_multiply_32fc_a_sse3(
lv_32fc_t* cVector,
const lv_32fc_t* aVector,
const lv_32fc_t scalar,
unsigned int num_points){
106 unsigned int number = 0;
107 const unsigned int halfPoints = num_points / 2;
109 __m128 x, yl, yh, z, tmp1, tmp2;
117 for(;number < halfPoints; number++){
119 x = _mm_load_ps((
float*)a);
121 tmp1 = _mm_mul_ps(x,yl);
123 x = _mm_shuffle_ps(x,x,0xB1);
125 tmp2 = _mm_mul_ps(x,yh);
127 z = _mm_addsub_ps(tmp1,tmp2);
129 _mm_store_ps((
float*)c,z);
135 if((num_points % 2) != 0) {
142 #ifdef LV_HAVE_GENERIC
150 static inline void volk_32fc_s32fc_multiply_32fc_a_generic(
lv_32fc_t* cVector,
const lv_32fc_t* aVector,
const lv_32fc_t scalar,
unsigned int num_points){
153 unsigned int number = num_points;
157 *cPtr++ = (*aPtr++) * scalar;
158 *cPtr++ = (*aPtr++) * scalar;
159 *cPtr++ = (*aPtr++) * scalar;
160 *cPtr++ = (*aPtr++) * scalar;
161 *cPtr++ = (*aPtr++) * scalar;
162 *cPtr++ = (*aPtr++) * scalar;
163 *cPtr++ = (*aPtr++) * scalar;
164 *cPtr++ = (*aPtr++) * scalar;
170 *cPtr++ = *aPtr++ * scalar;
float complex lv_32fc_t
Definition: volk_complex.h:56
#define lv_creal(x)
Definition: volk_complex.h:76
#define lv_cimag(x)
Definition: volk_complex.h:78