1 #ifndef INCLUDED_volk_8ic_deinterleave_16i_x2_a_H
2 #define INCLUDED_volk_8ic_deinterleave_16i_x2_a_H
16 static inline void volk_8ic_deinterleave_16i_x2_a_sse4_1(
int16_t* iBuffer,
int16_t* qBuffer,
const lv_8sc_t* complexVector,
unsigned int num_points){
17 unsigned int number = 0;
21 __m128i iMoveMask = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 14, 12, 10, 8, 6, 4, 2, 0);
22 __m128i qMoveMask = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 15, 13, 11, 9, 7, 5, 3, 1);
23 __m128i complexVal, iOutputVal, qOutputVal;
25 unsigned int eighthPoints = num_points / 8;
27 for(number = 0; number < eighthPoints; number++){
28 complexVal = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 16;
30 iOutputVal = _mm_shuffle_epi8(complexVal, iMoveMask);
31 qOutputVal = _mm_shuffle_epi8(complexVal, qMoveMask);
33 iOutputVal = _mm_cvtepi8_epi16(iOutputVal);
34 iOutputVal = _mm_slli_epi16(iOutputVal, 8);
36 qOutputVal = _mm_cvtepi8_epi16(qOutputVal);
37 qOutputVal = _mm_slli_epi16(qOutputVal, 8);
39 _mm_store_si128((__m128i*)iBufferPtr, iOutputVal);
40 _mm_store_si128((__m128i*)qBufferPtr, qOutputVal);
46 number = eighthPoints * 8;
47 for(; number < num_points; number++){
48 *iBufferPtr++ = ((
int16_t)*complexVectorPtr++) * 256;
49 *qBufferPtr++ = ((
int16_t)*complexVectorPtr++) * 256;
54 #ifdef LV_HAVE_GENERIC
62 static inline void volk_8ic_deinterleave_16i_x2_generic(
int16_t* iBuffer,
int16_t* qBuffer,
const lv_8sc_t* complexVector,
unsigned int num_points){
63 const int8_t* complexVectorPtr = (
const int8_t*)complexVector;
67 for(number = 0; number < num_points; number++){
68 *iBufferPtr++ = (
int16_t)(*complexVectorPtr++)*256;
69 *qBufferPtr++ = (
int16_t)(*complexVectorPtr++)*256;
signed short int16_t
Definition: stdint.h:76
signed char int8_t
Definition: stdint.h:75
char complex lv_8sc_t
Provide typedefs and operators for all complex types in C and C++.
Definition: volk_complex.h:52