58#ifndef INCLUDED_volk_32fc_deinterleave_real_64f_a_H
59#define INCLUDED_volk_32fc_deinterleave_real_64f_a_H
67static 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;
116 __m128 cplxValue, fVal;
118 for (; number < halfPoints; number++) {
120 cplxValue = _mm_load_ps(complexVectorPtr);
121 complexVectorPtr += 4;
124 fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(2, 0, 2, 0));
125 dVal = _mm_cvtps_pd(fVal);
126 _mm_store_pd(iBufferPtr, dVal);
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++;
158static 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
205#include <immintrin.h>
207static 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++;
244#include <riscv_vector.h>
246static inline void volk_32fc_deinterleave_real_64f_rvv(
double* iBuffer,
248 unsigned int num_points)
250 const uint64_t* in = (
const uint64_t*)complexVector;
251 size_t n = num_points;
252 for (
size_t vl; n > 0; n -= vl, in += vl, iBuffer += vl) {
253 vl = __riscv_vsetvl_e64m8(n);
254 vuint32m4_t vi = __riscv_vnsrl(__riscv_vle64_v_u64m8(in, vl), 0, vl);
255 __riscv_vse64(iBuffer, __riscv_vfwcvt_f(__riscv_vreinterpret_f32m4(vi), vl), vl);
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