1 #ifndef INCLUDED_volk_32f_convert_64f_u_H
2 #define INCLUDED_volk_32f_convert_64f_u_H
15 static inline void volk_32f_convert_64f_u_sse2(
double* outputVector,
const float* inputVector,
unsigned int num_points){
16 unsigned int number = 0;
18 const unsigned int quarterPoints = num_points / 4;
20 const float* inputVectorPtr = (
const float*)inputVector;
21 double* outputVectorPtr = outputVector;
25 for(;number < quarterPoints; number++){
26 inputVal = _mm_loadu_ps(inputVectorPtr); inputVectorPtr += 4;
28 ret = _mm_cvtps_pd(inputVal);
30 _mm_storeu_pd(outputVectorPtr, ret);
33 inputVal = _mm_movehl_ps(inputVal, inputVal);
35 ret = _mm_cvtps_pd(inputVal);
37 _mm_storeu_pd(outputVectorPtr, ret);
41 number = quarterPoints * 4;
42 for(; number < num_points; number++){
43 outputVector[number] = (double)(inputVector[number]);
49 #ifdef LV_HAVE_GENERIC
56 static inline void volk_32f_convert_64f_generic(
double* outputVector,
const float* inputVector,
unsigned int num_points){
57 double* outputVectorPtr = outputVector;
58 const float* inputVectorPtr = inputVector;
59 unsigned int number = 0;
61 for(number = 0; number < num_points; number++){
62 *outputVectorPtr++ = ((double)(*inputVectorPtr++));
71 #ifndef INCLUDED_volk_32f_convert_64f_a_H
72 #define INCLUDED_volk_32f_convert_64f_a_H
78 #include <emmintrin.h>
85 static inline void volk_32f_convert_64f_a_sse2(
double* outputVector,
const float* inputVector,
unsigned int num_points){
86 unsigned int number = 0;
88 const unsigned int quarterPoints = num_points / 4;
90 const float* inputVectorPtr = (
const float*)inputVector;
91 double* outputVectorPtr = outputVector;
95 for(;number < quarterPoints; number++){
96 inputVal = _mm_load_ps(inputVectorPtr); inputVectorPtr += 4;
98 ret = _mm_cvtps_pd(inputVal);
100 _mm_store_pd(outputVectorPtr, ret);
101 outputVectorPtr += 2;
103 inputVal = _mm_movehl_ps(inputVal, inputVal);
105 ret = _mm_cvtps_pd(inputVal);
107 _mm_store_pd(outputVectorPtr, ret);
108 outputVectorPtr += 2;
111 number = quarterPoints * 4;
112 for(; number < num_points; number++){
113 outputVector[number] = (double)(inputVector[number]);
119 #ifdef LV_HAVE_GENERIC
126 static inline void volk_32f_convert_64f_a_generic(
double* outputVector,
const float* inputVector,
unsigned int num_points){
127 double* outputVectorPtr = outputVector;
128 const float* inputVectorPtr = inputVector;
129 unsigned int number = 0;
131 for(number = 0; number < num_points; number++){
132 *outputVectorPtr++ = ((double)(*inputVectorPtr++));