1 #ifndef INCLUDED_volk_32f_x2_interleave_32fc_a_H
2 #define INCLUDED_volk_32f_x2_interleave_32fc_a_H
16 static inline void volk_32f_x2_interleave_32fc_a_sse(
lv_32fc_t* complexVector,
const float* iBuffer,
const float* qBuffer,
unsigned int num_points){
17 unsigned int number = 0;
18 float* complexVectorPtr = (
float*)complexVector;
19 const float* iBufferPtr = iBuffer;
20 const float* qBufferPtr = qBuffer;
22 const uint64_t quarterPoints = num_points / 4;
24 __m128 iValue, qValue, cplxValue;
25 for(;number < quarterPoints; number++){
26 iValue = _mm_load_ps(iBufferPtr);
27 qValue = _mm_load_ps(qBufferPtr);
30 cplxValue = _mm_unpacklo_ps(iValue, qValue);
31 _mm_store_ps(complexVectorPtr, cplxValue);
32 complexVectorPtr += 4;
35 cplxValue = _mm_unpackhi_ps(iValue, qValue);
36 _mm_store_ps(complexVectorPtr, cplxValue);
37 complexVectorPtr += 4;
43 number = quarterPoints * 4;
44 for(; number < num_points; number++){
45 *complexVectorPtr++ = *iBufferPtr++;
46 *complexVectorPtr++ = *qBufferPtr++;
60 static inline void volk_32f_x2_interleave_32fc_neon(
lv_32fc_t* complexVector,
const float* iBuffer,
const float* qBuffer,
unsigned int num_points){
61 unsigned int quarter_points = num_points / 4;
63 float* complexVectorPtr = (
float*) complexVector;
65 float32x4x2_t complex_vec;
66 for(number=0; number < quarter_points; ++number) {
67 complex_vec.val[0] = vld1q_f32(iBuffer);
68 complex_vec.val[1] = vld1q_f32(qBuffer);
69 vst2q_f32(complexVectorPtr, complex_vec);
72 complexVectorPtr += 8;
75 for(number=quarter_points * 4; number < num_points; ++number) {
76 *complexVectorPtr++ = *iBuffer++;
77 *complexVectorPtr++ = *qBuffer++;
84 #ifdef LV_HAVE_GENERIC
92 static inline void volk_32f_x2_interleave_32fc_generic(
lv_32fc_t* complexVector,
const float* iBuffer,
const float* qBuffer,
unsigned int num_points){
93 float* complexVectorPtr = (
float*)complexVector;
94 const float* iBufferPtr = iBuffer;
95 const float* qBufferPtr = qBuffer;
98 for(number = 0; number < num_points; number++){
99 *complexVectorPtr++ = *iBufferPtr++;
100 *complexVectorPtr++ = *qBufferPtr++;
unsigned __int64 uint64_t
Definition: stdint.h:90
float complex lv_32fc_t
Definition: volk_complex.h:56