1 #ifndef INCLUDED_volk_32fc_deinterleave_64f_x2_u_H
2 #define INCLUDED_volk_32fc_deinterleave_64f_x2_u_H
16 static inline void volk_32fc_deinterleave_64f_x2_u_sse2(
double* iBuffer,
double* qBuffer,
const lv_32fc_t* complexVector,
unsigned int num_points){
17 unsigned int number = 0;
19 const float* complexVectorPtr = (
float*)complexVector;
20 double* iBufferPtr = iBuffer;
21 double* qBufferPtr = qBuffer;
23 const unsigned int halfPoints = num_points / 2;
24 __m128 cplxValue, fVal;
27 for(;number < halfPoints; number++){
29 cplxValue = _mm_loadu_ps(complexVectorPtr);
30 complexVectorPtr += 4;
33 fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(2,0,2,0));
34 dVal = _mm_cvtps_pd(fVal);
35 _mm_storeu_pd(iBufferPtr, dVal);
38 fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(3,1,3,1));
39 dVal = _mm_cvtps_pd(fVal);
40 _mm_storeu_pd(qBufferPtr, dVal);
46 number = halfPoints * 2;
47 for(; number < num_points; number++){
48 *iBufferPtr++ = *complexVectorPtr++;
49 *qBufferPtr++ = *complexVectorPtr++;
54 #ifdef LV_HAVE_GENERIC
62 static inline void volk_32fc_deinterleave_64f_x2_generic(
double* iBuffer,
double* qBuffer,
const lv_32fc_t* complexVector,
unsigned int num_points){
63 unsigned int number = 0;
64 const float* complexVectorPtr = (
float*)complexVector;
65 double* iBufferPtr = iBuffer;
66 double* qBufferPtr = qBuffer;
68 for(number = 0; number < num_points; number++){
69 *iBufferPtr++ = (double)*complexVectorPtr++;
70 *qBufferPtr++ = (double)*complexVectorPtr++;
79 #ifndef INCLUDED_volk_32fc_deinterleave_64f_x2_a_H
80 #define INCLUDED_volk_32fc_deinterleave_64f_x2_a_H
86 #include <emmintrin.h>
94 static inline void volk_32fc_deinterleave_64f_x2_a_sse2(
double* iBuffer,
double* qBuffer,
const lv_32fc_t* complexVector,
unsigned int num_points){
95 unsigned int number = 0;
97 const float* complexVectorPtr = (
float*)complexVector;
98 double* iBufferPtr = iBuffer;
99 double* qBufferPtr = qBuffer;
101 const unsigned int halfPoints = num_points / 2;
102 __m128 cplxValue, fVal;
105 for(;number < halfPoints; number++){
107 cplxValue = _mm_load_ps(complexVectorPtr);
108 complexVectorPtr += 4;
111 fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(2,0,2,0));
112 dVal = _mm_cvtps_pd(fVal);
113 _mm_store_pd(iBufferPtr, dVal);
116 fVal = _mm_shuffle_ps(cplxValue, cplxValue, _MM_SHUFFLE(3,1,3,1));
117 dVal = _mm_cvtps_pd(fVal);
118 _mm_store_pd(qBufferPtr, dVal);
124 number = halfPoints * 2;
125 for(; number < num_points; number++){
126 *iBufferPtr++ = *complexVectorPtr++;
127 *qBufferPtr++ = *complexVectorPtr++;
132 #ifdef LV_HAVE_GENERIC
140 static inline void volk_32fc_deinterleave_64f_x2_a_generic(
double* iBuffer,
double* qBuffer,
const lv_32fc_t* complexVector,
unsigned int num_points){
141 unsigned int number = 0;
142 const float* complexVectorPtr = (
float*)complexVector;
143 double* iBufferPtr = iBuffer;
144 double* qBufferPtr = qBuffer;
146 for(number = 0; number < num_points; number++){
147 *iBufferPtr++ = (double)*complexVectorPtr++;
148 *qBufferPtr++ = (double)*complexVectorPtr++;
float complex lv_32fc_t
Definition: volk_complex.h:56