1 #ifndef INCLUDED_volk_16ic_s32f_deinterleave_real_32f_a_H
2 #define INCLUDED_volk_16ic_s32f_deinterleave_real_32f_a_H
17 static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse4_1(
float* iBuffer,
const lv_16sc_t* complexVector,
const float scalar,
unsigned int num_points){
18 float* iBufferPtr = iBuffer;
20 unsigned int number = 0;
21 const unsigned int quarterPoints = num_points / 4;
25 const float iScalar= 1.0 / scalar;
26 __m128 invScalar = _mm_set_ps1(iScalar);
27 __m128i complexVal, iIntVal;
30 __m128i moveMask = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 13, 12, 9, 8, 5, 4, 1, 0);
32 for(;number < quarterPoints; number++){
33 complexVal = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 16;
34 complexVal = _mm_shuffle_epi8(complexVal, moveMask);
36 iIntVal = _mm_cvtepi16_epi32(complexVal);
37 iFloatValue = _mm_cvtepi32_ps(iIntVal);
39 iFloatValue = _mm_mul_ps(iFloatValue, invScalar);
41 _mm_store_ps(iBufferPtr, iFloatValue);
46 number = quarterPoints * 4;
47 int16_t* sixteenTComplexVectorPtr = (
int16_t*)&complexVector[number];
48 for(; number < num_points; number++){
49 *iBufferPtr++ = ((float)(*sixteenTComplexVectorPtr++)) * iScalar;
50 sixteenTComplexVectorPtr++;
57 #include <xmmintrin.h>
65 static inline void volk_16ic_s32f_deinterleave_real_32f_a_sse(
float* iBuffer,
const lv_16sc_t* complexVector,
const float scalar,
unsigned int num_points){
66 float* iBufferPtr = iBuffer;
68 unsigned int number = 0;
69 const unsigned int quarterPoints = num_points / 4;
72 const float iScalar = 1.0/scalar;
73 __m128 invScalar = _mm_set_ps1(iScalar);
78 for(;number < quarterPoints; number++){
79 floatBuffer[0] = (float)(*complexVectorPtr); complexVectorPtr += 2;
80 floatBuffer[1] = (float)(*complexVectorPtr); complexVectorPtr += 2;
81 floatBuffer[2] = (float)(*complexVectorPtr); complexVectorPtr += 2;
82 floatBuffer[3] = (float)(*complexVectorPtr); complexVectorPtr += 2;
84 iValue = _mm_load_ps(floatBuffer);
86 iValue = _mm_mul_ps(iValue, invScalar);
88 _mm_store_ps(iBufferPtr, iValue);
93 number = quarterPoints * 4;
94 complexVectorPtr = (
int16_t*)&complexVector[number];
95 for(; number < num_points; number++){
96 *iBufferPtr++ = ((float)(*complexVectorPtr++)) * iScalar;
103 #ifdef LV_HAVE_GENERIC
111 static inline void volk_16ic_s32f_deinterleave_real_32f_generic(
float* iBuffer,
const lv_16sc_t* complexVector,
const float scalar,
unsigned int num_points){
112 unsigned int number = 0;
114 float* iBufferPtr = iBuffer;
115 const float invScalar = 1.0 / scalar;
116 for(number = 0; number < num_points; number++){
117 *iBufferPtr++ = ((float)(*complexVectorPtr++)) * invScalar;
short complex lv_16sc_t
Definition: volk_complex.h:53
signed short int16_t
Definition: stdint.h:76
signed char int8_t
Definition: stdint.h:75
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:27