GNU Radio 3.6.5 C++ API
|
00001 #ifndef INCLUDED_volk_32fc_deinterleave_imag_32f_a_H 00002 #define INCLUDED_volk_32fc_deinterleave_imag_32f_a_H 00003 00004 #include <inttypes.h> 00005 #include <stdio.h> 00006 00007 #ifdef LV_HAVE_SSE 00008 #include <xmmintrin.h> 00009 /*! 00010 \brief Deinterleaves the complex vector into Q vector data 00011 \param complexVector The complex input vector 00012 \param qBuffer The Q buffer output data 00013 \param num_points The number of complex data values to be deinterleaved 00014 */ 00015 static inline void volk_32fc_deinterleave_imag_32f_a_sse(float* qBuffer, const lv_32fc_t* complexVector, unsigned int num_points){ 00016 unsigned int number = 0; 00017 const unsigned int quarterPoints = num_points / 4; 00018 00019 const float* complexVectorPtr = (const float*)complexVector; 00020 float* qBufferPtr = qBuffer; 00021 00022 __m128 cplxValue1, cplxValue2, iValue; 00023 for(;number < quarterPoints; number++){ 00024 00025 cplxValue1 = _mm_load_ps(complexVectorPtr); 00026 complexVectorPtr += 4; 00027 00028 cplxValue2 = _mm_load_ps(complexVectorPtr); 00029 complexVectorPtr += 4; 00030 00031 // Arrange in q1q2q3q4 format 00032 iValue = _mm_shuffle_ps(cplxValue1, cplxValue2, _MM_SHUFFLE(3,1,3,1)); 00033 00034 _mm_store_ps(qBufferPtr, iValue); 00035 00036 qBufferPtr += 4; 00037 } 00038 00039 number = quarterPoints * 4; 00040 for(; number < num_points; number++){ 00041 complexVectorPtr++; 00042 *qBufferPtr++ = *complexVectorPtr++; 00043 } 00044 } 00045 #endif /* LV_HAVE_SSE */ 00046 00047 #ifdef LV_HAVE_GENERIC 00048 /*! 00049 \brief Deinterleaves the complex vector into Q vector data 00050 \param complexVector The complex input vector 00051 \param qBuffer The I buffer output data 00052 \param num_points The number of complex data values to be deinterleaved 00053 */ 00054 static inline void volk_32fc_deinterleave_imag_32f_a_generic(float* qBuffer, const lv_32fc_t* complexVector, unsigned int num_points){ 00055 unsigned int number = 0; 00056 const float* complexVectorPtr = (float*)complexVector; 00057 float* qBufferPtr = qBuffer; 00058 for(number = 0; number < num_points; number++){ 00059 complexVectorPtr++; 00060 *qBufferPtr++ = *complexVectorPtr++; 00061 } 00062 } 00063 #endif /* LV_HAVE_GENERIC */ 00064 00065 00066 00067 00068 #endif /* INCLUDED_volk_32fc_deinterleave_imag_32f_a_H */