57 #ifndef INCLUDED_volk_32fc_deinterleave_real_32f_a_H
58 #define INCLUDED_volk_32fc_deinterleave_real_32f_a_H
64 #include <immintrin.h>
66 static inline void volk_32fc_deinterleave_real_32f_a_avx2(
float* iBuffer,
68 unsigned int num_points)
70 unsigned int number = 0;
71 const unsigned int eighthPoints = num_points / 8;
73 const float* complexVectorPtr = (
const float*)complexVector;
74 float* iBufferPtr = iBuffer;
76 __m256 cplxValue1, cplxValue2;
78 __m256i idx = _mm256_set_epi32(7, 6, 3, 2, 5, 4, 1, 0);
79 for (; number < eighthPoints; number++) {
81 cplxValue1 = _mm256_load_ps(complexVectorPtr);
82 complexVectorPtr += 8;
84 cplxValue2 = _mm256_load_ps(complexVectorPtr);
85 complexVectorPtr += 8;
88 iValue = _mm256_shuffle_ps(cplxValue1, cplxValue2,
_MM_SHUFFLE(2, 0, 2, 0));
89 iValue = _mm256_permutevar8x32_ps(iValue, idx);
91 _mm256_store_ps(iBufferPtr, iValue);
96 number = eighthPoints * 8;
97 for (; number < num_points; number++) {
98 *iBufferPtr++ = *complexVectorPtr++;
105 #include <xmmintrin.h>
109 unsigned int num_points)
111 unsigned int number = 0;
112 const unsigned int quarterPoints = num_points / 4;
114 const float* complexVectorPtr = (
const float*)complexVector;
115 float* iBufferPtr = iBuffer;
117 __m128 cplxValue1, cplxValue2, iValue;
118 for (; number < quarterPoints; number++) {
121 complexVectorPtr += 4;
124 complexVectorPtr += 4;
134 number = quarterPoints * 4;
135 for (; number < num_points; number++) {
136 *iBufferPtr++ = *complexVectorPtr++;
143 #ifdef LV_HAVE_GENERIC
147 unsigned int num_points)
149 unsigned int number = 0;
150 const float* complexVectorPtr = (
float*)complexVector;
151 float* iBufferPtr = iBuffer;
152 for (number = 0; number < num_points; number++) {
153 *iBufferPtr++ = *complexVectorPtr++;
161 #include <arm_neon.h>
165 unsigned int num_points)
167 unsigned int number = 0;
168 unsigned int quarter_points = num_points / 4;
169 const float* complexVectorPtr = (
float*)complexVector;
170 float* iBufferPtr = iBuffer;
171 float32x4x2_t complexInput;
173 for (number = 0; number < quarter_points; number++) {
174 complexInput = vld2q_f32(complexVectorPtr);
175 vst1q_f32(iBufferPtr, complexInput.val[0]);
176 complexVectorPtr += 8;
180 for (number = quarter_points * 4; number < num_points; number++) {
181 *iBufferPtr++ = *complexVectorPtr++;
190 #ifndef INCLUDED_volk_32fc_deinterleave_real_32f_u_H
191 #define INCLUDED_volk_32fc_deinterleave_real_32f_u_H
193 #include <inttypes.h>
197 #include <immintrin.h>
199 static inline void volk_32fc_deinterleave_real_32f_u_avx2(
float* iBuffer,
201 unsigned int num_points)
203 unsigned int number = 0;
204 const unsigned int eighthPoints = num_points / 8;
206 const float* complexVectorPtr = (
const float*)complexVector;
207 float* iBufferPtr = iBuffer;
209 __m256 cplxValue1, cplxValue2;
211 __m256i idx = _mm256_set_epi32(7, 6, 3, 2, 5, 4, 1, 0);
212 for (; number < eighthPoints; number++) {
214 cplxValue1 = _mm256_loadu_ps(complexVectorPtr);
215 complexVectorPtr += 8;
217 cplxValue2 = _mm256_loadu_ps(complexVectorPtr);
218 complexVectorPtr += 8;
221 iValue = _mm256_shuffle_ps(cplxValue1, cplxValue2,
_MM_SHUFFLE(2, 0, 2, 0));
222 iValue = _mm256_permutevar8x32_ps(iValue, idx);
224 _mm256_storeu_ps(iBufferPtr, iValue);
229 number = eighthPoints * 8;
230 for (; number < num_points; number++) {
231 *iBufferPtr++ = *complexVectorPtr++;
float32x4_t __m128
Definition: sse2neon.h:235
#define _mm_shuffle_ps(a, b, imm)
Definition: sse2neon.h:2586
#define _MM_SHUFFLE(fp3, fp2, fp1, fp0)
Definition: sse2neon.h:195
FORCE_INLINE __m128 _mm_load_ps(const float *p)
Definition: sse2neon.h:1858
FORCE_INLINE void _mm_store_ps(float *p, __m128 a)
Definition: sse2neon.h:2704
static void volk_32fc_deinterleave_real_32f_generic(float *iBuffer, const lv_32fc_t *complexVector, unsigned int num_points)
Definition: volk_32fc_deinterleave_real_32f.h:145
static void volk_32fc_deinterleave_real_32f_a_sse(float *iBuffer, const lv_32fc_t *complexVector, unsigned int num_points)
Definition: volk_32fc_deinterleave_real_32f.h:107
static void volk_32fc_deinterleave_real_32f_neon(float *iBuffer, const lv_32fc_t *complexVector, unsigned int num_points)
Definition: volk_32fc_deinterleave_real_32f.h:163
float complex lv_32fc_t
Definition: volk_complex.h:74