23 #ifndef INCLUDED_VOLK_8sc_DEINTERLEAVE_REAL_8s_ALIGNED8_H
24 #define INCLUDED_VOLK_8sc_DEINTERLEAVE_REAL_8s_ALIGNED8_H
30 #include <tmmintrin.h>
37 static inline void volk_8ic_deinterleave_real_8i_a_ssse3(
int8_t* iBuffer,
const lv_8sc_t* complexVector,
unsigned int num_points){
38 unsigned int number = 0;
40 int8_t* iBufferPtr = iBuffer;
41 __m128i moveMask1 = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 14, 12, 10, 8, 6, 4, 2, 0);
42 __m128i moveMask2 = _mm_set_epi8(14, 12, 10, 8, 6, 4, 2, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80);
43 __m128i complexVal1, complexVal2, outputVal;
45 unsigned int sixteenthPoints = num_points / 16;
47 for(number = 0; number < sixteenthPoints; number++){
48 complexVal1 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 16;
49 complexVal2 = _mm_load_si128((__m128i*)complexVectorPtr); complexVectorPtr += 16;
51 complexVal1 = _mm_shuffle_epi8(complexVal1, moveMask1);
52 complexVal2 = _mm_shuffle_epi8(complexVal2, moveMask2);
54 outputVal = _mm_or_si128(complexVal1, complexVal2);
56 _mm_store_si128((__m128i*)iBufferPtr, outputVal);
60 number = sixteenthPoints * 16;
61 for(; number < num_points; number++){
62 *iBufferPtr++ = *complexVectorPtr++;
69 #include <immintrin.h>
77 static inline void volk_8ic_deinterleave_real_8i_a_avx(
int8_t* iBuffer,
const lv_8sc_t* complexVector,
unsigned int num_points){
78 unsigned int number = 0;
80 int8_t* iBufferPtr = iBuffer;
81 __m128i moveMaskL = _mm_set_epi8(0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 14, 12, 10, 8, 6, 4, 2, 0);
82 __m128i moveMaskH = _mm_set_epi8(14, 12, 10, 8, 6, 4, 2, 0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80);
83 __m256i complexVal1, complexVal2, outputVal;
84 __m128i complexVal1H, complexVal1L, complexVal2H, complexVal2L, outputVal1, outputVal2;
86 unsigned int thirtysecondPoints = num_points / 32;
88 for(number = 0; number < thirtysecondPoints; number++){
90 complexVal1 = _mm256_load_si256((__m256i*)complexVectorPtr);
91 complexVectorPtr += 32;
92 complexVal2 = _mm256_load_si256((__m256i*)complexVectorPtr);
93 complexVectorPtr += 32;
95 complexVal1H = _mm256_extractf128_si256(complexVal1, 1);
96 complexVal1L = _mm256_extractf128_si256(complexVal1, 0);
97 complexVal2H = _mm256_extractf128_si256(complexVal2, 1);
98 complexVal2L = _mm256_extractf128_si256(complexVal2, 0);
100 complexVal1H = _mm_shuffle_epi8(complexVal1H, moveMaskH);
101 complexVal1L = _mm_shuffle_epi8(complexVal1L, moveMaskL);
102 outputVal1 = _mm_or_si128(complexVal1H, complexVal1L);
105 complexVal2H = _mm_shuffle_epi8(complexVal2H, moveMaskH);
106 complexVal2L = _mm_shuffle_epi8(complexVal2L, moveMaskL);
107 outputVal2 = _mm_or_si128(complexVal2H, complexVal2L);
109 __m256i dummy = _mm256_setzero_si256();
110 outputVal = _mm256_insertf128_si256(dummy, outputVal1, 0);
111 outputVal = _mm256_insertf128_si256(outputVal, outputVal2, 1);
114 _mm256_store_si256((__m256i*)iBufferPtr, outputVal);
118 number = thirtysecondPoints * 32;
119 for(; number < num_points; number++){
120 *iBufferPtr++ = *complexVectorPtr++;
126 #ifdef LV_HAVE_GENERIC
133 static inline void volk_8ic_deinterleave_real_8i_generic(
int8_t* iBuffer,
const lv_8sc_t* complexVector,
unsigned int num_points){
134 unsigned int number = 0;
135 const int8_t* complexVectorPtr = (
int8_t*)complexVector;
136 int8_t* iBufferPtr = iBuffer;
137 for(number = 0; number < num_points; number++){
138 *iBufferPtr++ = *complexVectorPtr++;
145 #include <arm_neon.h>
152 static inline void volk_8ic_deinterleave_real_8i_neon(
int8_t* iBuffer,
const lv_8sc_t* complexVector,
unsigned int num_points){
154 unsigned int sixteenth_points = num_points / 16;
156 int8x16x2_t input_vector;
157 for(number=0; number < sixteenth_points; ++number) {
158 input_vector = vld2q_s8((
int8_t*) complexVector );
159 vst1q_s8(iBuffer, input_vector.val[0]);
164 const int8_t* complexVectorPtr = (
int8_t*)complexVector;
165 int8_t* iBufferPtr = iBuffer;
166 for(number = sixteenth_points*16; number < num_points; number++){
167 *iBufferPtr++ = *complexVectorPtr++;
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