1 #ifndef INCLUDED_volk_8ic_s32f_deinterleave_real_32f_a_H
2 #define INCLUDED_volk_8ic_s32f_deinterleave_real_32f_a_H
17 static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse4_1(
float* iBuffer,
const lv_8sc_t* complexVector,
const float scalar,
unsigned int num_points){
18 float* iBufferPtr = iBuffer;
20 unsigned int number = 0;
21 const unsigned int eighthPoints = num_points / 8;
24 const float iScalar= 1.0 / scalar;
25 __m128 invScalar = _mm_set_ps1(iScalar);
26 __m128i complexVal, iIntVal;
29 __m128i moveMask = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 14, 12, 10, 8, 6, 4, 2, 0);
31 for(;number < eighthPoints; number++){
32 complexVal = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 16;
33 complexVal = _mm_shuffle_epi8(complexVal, moveMask);
35 iIntVal = _mm_cvtepi8_epi32(complexVal);
36 iFloatValue = _mm_cvtepi32_ps(iIntVal);
38 iFloatValue = _mm_mul_ps(iFloatValue, invScalar);
40 _mm_store_ps(iBufferPtr, iFloatValue);
44 complexVal = _mm_srli_si128(complexVal, 4);
45 iIntVal = _mm_cvtepi8_epi32(complexVal);
46 iFloatValue = _mm_cvtepi32_ps(iIntVal);
48 iFloatValue = _mm_mul_ps(iFloatValue, invScalar);
50 _mm_store_ps(iBufferPtr, iFloatValue);
55 number = eighthPoints * 8;
56 for(; number < num_points; number++){
57 *iBufferPtr++ = (float)(*complexVectorPtr++) * iScalar;
66 #include <xmmintrin.h>
74 static inline void volk_8ic_s32f_deinterleave_real_32f_a_sse(
float* iBuffer,
const lv_8sc_t* complexVector,
const float scalar,
unsigned int num_points){
75 float* iBufferPtr = iBuffer;
77 unsigned int number = 0;
78 const unsigned int quarterPoints = num_points / 4;
81 const float iScalar= 1.0 / scalar;
82 __m128 invScalar = _mm_set_ps1(iScalar);
87 for(;number < quarterPoints; number++){
88 floatBuffer[0] = (float)(*complexVectorPtr); complexVectorPtr += 2;
89 floatBuffer[1] = (float)(*complexVectorPtr); complexVectorPtr += 2;
90 floatBuffer[2] = (float)(*complexVectorPtr); complexVectorPtr += 2;
91 floatBuffer[3] = (float)(*complexVectorPtr); complexVectorPtr += 2;
93 iValue = _mm_load_ps(floatBuffer);
95 iValue = _mm_mul_ps(iValue, invScalar);
97 _mm_store_ps(iBufferPtr, iValue);
102 number = quarterPoints * 4;
103 for(; number < num_points; number++){
104 *iBufferPtr++ = (float)(*complexVectorPtr++) * iScalar;
111 #ifdef LV_HAVE_GENERIC
119 static inline void volk_8ic_s32f_deinterleave_real_32f_generic(
float* iBuffer,
const lv_8sc_t* complexVector,
const float scalar,
unsigned int num_points){
120 unsigned int number = 0;
121 const int8_t* complexVectorPtr = (
const int8_t*)complexVector;
122 float* iBufferPtr = iBuffer;
123 const float invScalar = 1.0 / scalar;
124 for(number = 0; number < num_points; number++){
125 *iBufferPtr++ = ((float)(*complexVectorPtr++)) * invScalar;
signed char int8_t
Definition: stdint.h:75
#define __VOLK_ATTR_ALIGNED(x)
Definition: volk_common.h:27
char complex lv_8sc_t
Provide typedefs and operators for all complex types in C and C++.
Definition: volk_complex.h:52