58 #ifndef INCLUDED_volk_32fc_deinterleave_real_64f_a_H
59 #define INCLUDED_volk_32fc_deinterleave_real_64f_a_H
65 #include <immintrin.h>
67 static inline void volk_32fc_deinterleave_real_64f_a_avx2(
double* iBuffer,
69 unsigned int num_points)
71 unsigned int number = 0;
73 const float* complexVectorPtr = (
float*)complexVector;
74 double* iBufferPtr = iBuffer;
76 const unsigned int quarterPoints = num_points / 4;
80 __m256i idx = _mm256_set_epi32(0, 0, 0, 0, 6, 4, 2, 0);
81 for (; number < quarterPoints; number++) {
83 cplxValue = _mm256_load_ps(complexVectorPtr);
84 complexVectorPtr += 8;
87 cplxValue = _mm256_permutevar8x32_ps(cplxValue, idx);
88 fVal = _mm256_extractf128_ps(cplxValue, 0);
89 dVal = _mm256_cvtps_pd(fVal);
90 _mm256_store_pd(iBufferPtr, dVal);
95 number = quarterPoints * 4;
96 for (; number < num_points; number++) {
97 *iBufferPtr++ = (double)*complexVectorPtr++;
104 #include <emmintrin.h>
108 unsigned int num_points)
110 unsigned int number = 0;
112 const float* complexVectorPtr = (
float*)complexVector;
113 double* iBufferPtr = iBuffer;
115 const unsigned int halfPoints = num_points / 2;
118 for (; number < halfPoints; number++) {
121 complexVectorPtr += 4;
131 number = halfPoints * 2;
132 for (; number < num_points; number++) {
133 *iBufferPtr++ = (double)*complexVectorPtr++;
139 #ifdef LV_HAVE_GENERIC
143 unsigned int num_points)
145 unsigned int number = 0;
146 const float* complexVectorPtr = (
float*)complexVector;
147 double* iBufferPtr = iBuffer;
148 for (number = 0; number < num_points; number++) {
149 *iBufferPtr++ = (double)*complexVectorPtr++;
155 #ifdef LV_HAVE_NEONV8
156 #include <arm_neon.h>
158 static inline void volk_32fc_deinterleave_real_64f_neon(
double* iBuffer,
160 unsigned int num_points)
162 unsigned int number = 0;
163 unsigned int quarter_points = num_points / 4;
164 const float* complexVectorPtr = (
float*)complexVector;
165 double* iBufferPtr = iBuffer;
166 float32x2x4_t complexInput;
171 for (number = 0; number < quarter_points; number++) {
173 complexInput = vld4_f32(complexVectorPtr);
176 iVal1 = vcvt_f64_f32(complexInput.val[0]);
177 iVal2 = vcvt_f64_f32(complexInput.val[2]);
182 vst2q_f64(iBufferPtr, iVal);
186 complexVectorPtr += 8;
189 for (number = quarter_points * 4; number < num_points; number++) {
190 *iBufferPtr++ = (double)*complexVectorPtr++;
198 #ifndef INCLUDED_volk_32fc_deinterleave_real_64f_u_H
199 #define INCLUDED_volk_32fc_deinterleave_real_64f_u_H
201 #include <inttypes.h>
205 #include <immintrin.h>
207 static inline void volk_32fc_deinterleave_real_64f_u_avx2(
double* iBuffer,
209 unsigned int num_points)
211 unsigned int number = 0;
213 const float* complexVectorPtr = (
float*)complexVector;
214 double* iBufferPtr = iBuffer;
216 const unsigned int quarterPoints = num_points / 4;
220 __m256i idx = _mm256_set_epi32(0, 0, 0, 0, 6, 4, 2, 0);
221 for (; number < quarterPoints; number++) {
223 cplxValue = _mm256_loadu_ps(complexVectorPtr);
224 complexVectorPtr += 8;
227 cplxValue = _mm256_permutevar8x32_ps(cplxValue, idx);
228 fVal = _mm256_extractf128_ps(cplxValue, 0);
229 dVal = _mm256_cvtps_pd(fVal);
230 _mm256_storeu_pd(iBufferPtr, dVal);
235 number = quarterPoints * 4;
236 for (; number < num_points; number++) {
237 *iBufferPtr++ = (double)*complexVectorPtr++;
float32x4_t __m128
Definition: sse2neon.h:235
#define _mm_shuffle_ps(a, b, imm)
Definition: sse2neon.h:2586
FORCE_INLINE __m128d _mm_cvtps_pd(__m128 a)
Definition: sse2neon.h:4096
float32x4_t __m128d
Definition: sse2neon.h:242
FORCE_INLINE void _mm_store_pd(double *mem_addr, __m128d a)
Definition: sse2neon.h:5897
#define _MM_SHUFFLE(fp3, fp2, fp1, fp0)
Definition: sse2neon.h:195
FORCE_INLINE __m128 _mm_load_ps(const float *p)
Definition: sse2neon.h:1858
static void volk_32fc_deinterleave_real_64f_a_sse2(double *iBuffer, const lv_32fc_t *complexVector, unsigned int num_points)
Definition: volk_32fc_deinterleave_real_64f.h:106
static void volk_32fc_deinterleave_real_64f_generic(double *iBuffer, const lv_32fc_t *complexVector, unsigned int num_points)
Definition: volk_32fc_deinterleave_real_64f.h:141
float complex lv_32fc_t
Definition: volk_complex.h:74