73 #ifndef INCLUDED_volk_32fc_s32f_deinterleave_real_16i_a_H
74 #define INCLUDED_volk_32fc_s32f_deinterleave_real_16i_a_H
81 #include <xmmintrin.h>
84 volk_32fc_s32f_deinterleave_real_16i_a_sse(
int16_t* iBuffer,
const lv_32fc_t* complexVector,
85 const float scalar,
unsigned int num_points)
87 unsigned int number = 0;
88 const unsigned int quarterPoints = num_points / 4;
90 const float* complexVectorPtr = (
float*)complexVector;
93 __m128 vScalar = _mm_set_ps1(scalar);
95 __m128 cplxValue1, cplxValue2, iValue;
99 for(;number < quarterPoints; number++){
100 cplxValue1 = _mm_load_ps(complexVectorPtr);
101 complexVectorPtr += 4;
103 cplxValue2 = _mm_load_ps(complexVectorPtr);
104 complexVectorPtr += 4;
107 iValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(2,0,2,0));
109 iValue = _mm_mul_ps(iValue, vScalar);
111 _mm_store_ps(floatBuffer, iValue);
112 *iBufferPtr++ = (
int16_t)(floatBuffer[0]);
113 *iBufferPtr++ = (
int16_t)(floatBuffer[1]);
114 *iBufferPtr++ = (
int16_t)(floatBuffer[2]);
115 *iBufferPtr++ = (
int16_t)(floatBuffer[3]);
118 number = quarterPoints * 4;
119 iBufferPtr = &iBuffer[number];
120 for(; number < num_points; number++){
121 *iBufferPtr++ = (
int16_t)(*complexVectorPtr++ * scalar);
129 #ifdef LV_HAVE_GENERIC
132 volk_32fc_s32f_deinterleave_real_16i_generic(
int16_t* iBuffer,
const lv_32fc_t* complexVector,
133 const float scalar,
unsigned int num_points)
135 const float* complexVectorPtr = (
float*)complexVector;
137 unsigned int number = 0;
138 for(number = 0; number < num_points; number++){
139 *iBufferPtr++ = (
int16_t)(*complexVectorPtr++ * scalar);
signed short int16_t
Definition: stdint.h:76
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:27
float complex lv_32fc_t
Definition: volk_complex.h:56