57#ifndef INCLUDED_volk_32fc_deinterleave_real_32f_a_H
58#define INCLUDED_volk_32fc_deinterleave_real_32f_a_H
66static 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++) {
120 cplxValue1 = _mm_load_ps(complexVectorPtr);
121 complexVectorPtr += 4;
123 cplxValue2 = _mm_load_ps(complexVectorPtr);
124 complexVectorPtr += 4;
127 iValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(2, 0, 2, 0));
129 _mm_store_ps(iBufferPtr, iValue);
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++;
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
197#include <immintrin.h>
199static 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++;
238#include <riscv_vector.h>
240static inline void volk_32fc_deinterleave_real_32f_rvv(
float* iBuffer,
242 unsigned int num_points)
244 const uint64_t* in = (
const uint64_t*)complexVector;
245 size_t n = num_points;
246 for (
size_t vl; n > 0; n -= vl, in += vl, iBuffer += vl) {
247 vl = __riscv_vsetvl_e64m8(n);
248 vuint64m8_t vc = __riscv_vle64_v_u64m8(in, vl);
249 __riscv_vse32((uint32_t*)iBuffer, __riscv_vnsrl(vc, 0, vl), vl);
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