71 #ifndef INCLUDED_volk_64f_x2_min_64f_a_H
72 #define INCLUDED_volk_64f_x2_min_64f_a_H
78 #include <emmintrin.h>
81 volk_64f_x2_min_64f_a_sse2(
double* cVector,
const double* aVector,
82 const double* bVector,
unsigned int num_points)
84 unsigned int number = 0;
85 const unsigned int halfPoints = num_points / 2;
87 double* cPtr = cVector;
88 const double* aPtr = aVector;
89 const double* bPtr= bVector;
91 __m128d aVal, bVal, cVal;
92 for(;number < halfPoints; number++){
94 aVal = _mm_load_pd(aPtr);
95 bVal = _mm_load_pd(bPtr);
97 cVal = _mm_min_pd(aVal, bVal);
99 _mm_store_pd(cPtr,cVal);
106 number = halfPoints * 2;
107 for(;number < num_points; number++){
108 const double a = *aPtr++;
109 const double b = *bPtr++;
110 *cPtr++ = ( a < b ? a : b);
116 #ifdef LV_HAVE_GENERIC
119 volk_64f_x2_min_64f_generic(
double* cVector,
const double* aVector,
120 const double* bVector,
unsigned int num_points)
122 double* cPtr = cVector;
123 const double* aPtr = aVector;
124 const double* bPtr= bVector;
125 unsigned int number = 0;
127 for(number = 0; number < num_points; number++){
128 const double a = *aPtr++;
129 const double b = *bPtr++;
130 *cPtr++ = ( a < b ? a : b);