1 #ifndef INCLUDED_volk_32fc_s32f_deinterleave_real_16i_a_H
2 #define INCLUDED_volk_32fc_s32f_deinterleave_real_16i_a_H
17 static inline void volk_32fc_s32f_deinterleave_real_16i_a_sse(
int16_t* iBuffer,
const lv_32fc_t* complexVector,
const float scalar,
unsigned int num_points){
18 unsigned int number = 0;
19 const unsigned int quarterPoints = num_points / 4;
21 const float* complexVectorPtr = (
float*)complexVector;
24 __m128 vScalar = _mm_set_ps1(scalar);
26 __m128 cplxValue1, cplxValue2, iValue;
30 for(;number < quarterPoints; number++){
31 cplxValue1 = _mm_load_ps(complexVectorPtr);
32 complexVectorPtr += 4;
34 cplxValue2 = _mm_load_ps(complexVectorPtr);
35 complexVectorPtr += 4;
38 iValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(2,0,2,0));
40 iValue = _mm_mul_ps(iValue, vScalar);
42 _mm_store_ps(floatBuffer, iValue);
43 *iBufferPtr++ = (
int16_t)(floatBuffer[0]);
44 *iBufferPtr++ = (
int16_t)(floatBuffer[1]);
45 *iBufferPtr++ = (
int16_t)(floatBuffer[2]);
46 *iBufferPtr++ = (
int16_t)(floatBuffer[3]);
49 number = quarterPoints * 4;
50 iBufferPtr = &iBuffer[number];
51 for(; number < num_points; number++){
52 *iBufferPtr++ = (
int16_t)(*complexVectorPtr++ * scalar);
58 #ifdef LV_HAVE_GENERIC
66 static inline void volk_32fc_s32f_deinterleave_real_16i_generic(
int16_t* iBuffer,
const lv_32fc_t* complexVector,
const float scalar,
unsigned int num_points){
67 const float* complexVectorPtr = (
float*)complexVector;
69 unsigned int number = 0;
70 for(number = 0; number < num_points; number++){
71 *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