1 #ifndef INCLUDED_volk_16ic_deinterleave_real_16i_a_H
2 #define INCLUDED_volk_16ic_deinterleave_real_16i_a_H
15 static inline void volk_16ic_deinterleave_real_16i_a_ssse3(
int16_t* iBuffer,
const lv_16sc_t* complexVector,
unsigned int num_points){
16 unsigned int number = 0;
20 __m128i iMoveMask1 = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 13, 12, 9, 8, 5, 4, 1, 0);
21 __m128i iMoveMask2 = _mm_set_epi8(13, 12, 9, 8, 5, 4, 1, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80);
23 __m128i complexVal1, complexVal2, iOutputVal;
25 unsigned int eighthPoints = num_points / 8;
27 for(number = 0; number < eighthPoints; number++){
28 complexVal1 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8;
29 complexVal2 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8;
31 complexVal1 = _mm_shuffle_epi8(complexVal1, iMoveMask1);
32 complexVal2 = _mm_shuffle_epi8(complexVal2, iMoveMask2);
34 iOutputVal = _mm_or_si128(complexVal1, complexVal2);
36 _mm_store_si128((__m128i*)iBufferPtr, iOutputVal);
41 number = eighthPoints * 8;
42 for(; number < num_points; number++){
43 *iBufferPtr++ = *complexVectorPtr++;
51 #include <emmintrin.h>
58 static inline void volk_16ic_deinterleave_real_16i_a_sse2(
int16_t* iBuffer,
const lv_16sc_t* complexVector,
unsigned int num_points){
59 unsigned int number = 0;
62 __m128i complexVal1, complexVal2, iOutputVal;
63 __m128i lowMask = _mm_set_epi32(0x0, 0x0, 0xFFFFFFFF, 0xFFFFFFFF);
64 __m128i highMask = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF, 0x0, 0x0);
66 unsigned int eighthPoints = num_points / 8;
68 for(number = 0; number < eighthPoints; number++){
69 complexVal1 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8;
70 complexVal2 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 8;
72 complexVal1 = _mm_shufflelo_epi16(complexVal1, _MM_SHUFFLE(3,1,2,0));
74 complexVal1 = _mm_shufflehi_epi16(complexVal1, _MM_SHUFFLE(3,1,2,0));
76 complexVal1 = _mm_shuffle_epi32(complexVal1, _MM_SHUFFLE(3,1,2,0));
78 complexVal2 = _mm_shufflelo_epi16(complexVal2, _MM_SHUFFLE(3,1,2,0));
80 complexVal2 = _mm_shufflehi_epi16(complexVal2, _MM_SHUFFLE(3,1,2,0));
82 complexVal2 = _mm_shuffle_epi32(complexVal2, _MM_SHUFFLE(2,0,3,1));
84 iOutputVal = _mm_or_si128(_mm_and_si128(complexVal1, lowMask), _mm_and_si128(complexVal2, highMask));
86 _mm_store_si128((__m128i*)iBufferPtr, iOutputVal);
91 number = eighthPoints * 8;
92 for(; number < num_points; number++){
93 *iBufferPtr++ = *complexVectorPtr++;
99 #ifdef LV_HAVE_GENERIC
106 static inline void volk_16ic_deinterleave_real_16i_generic(
int16_t* iBuffer,
const lv_16sc_t* complexVector,
unsigned int num_points){
107 unsigned int number = 0;
110 for(number = 0; number < num_points; number++){
111 *iBufferPtr++ = *complexVectorPtr++;
short complex lv_16sc_t
Definition: volk_complex.h:53
signed short int16_t
Definition: stdint.h:76