23 #ifndef INCLUDED_volk_64f_x2_max_64f_a_H
24 #define INCLUDED_volk_64f_x2_max_64f_a_H
30 #include <emmintrin.h>
38 static inline void volk_64f_x2_max_64f_a_sse2(
double* cVector,
const double* aVector,
const double* bVector,
unsigned int num_points){
39 unsigned int number = 0;
40 const unsigned int halfPoints = num_points / 2;
42 double* cPtr = cVector;
43 const double* aPtr = aVector;
44 const double* bPtr= bVector;
46 __m128d aVal, bVal, cVal;
47 for(;number < halfPoints; number++){
49 aVal = _mm_load_pd(aPtr);
50 bVal = _mm_load_pd(bPtr);
52 cVal = _mm_max_pd(aVal, bVal);
54 _mm_store_pd(cPtr,cVal);
61 number = halfPoints * 2;
62 for(;number < num_points; number++){
63 const double a = *aPtr++;
64 const double b = *bPtr++;
65 *cPtr++ = ( a > b ? a : b);
70 #ifdef LV_HAVE_GENERIC
78 static inline void volk_64f_x2_max_64f_generic(
double* cVector,
const double* aVector,
const double* bVector,
unsigned int num_points){
79 double* cPtr = cVector;
80 const double* aPtr = aVector;
81 const double* bPtr= bVector;
82 unsigned int number = 0;
84 for(number = 0; number < num_points; number++){
85 const double a = *aPtr++;
86 const double b = *bPtr++;
87 *cPtr++ = ( a > b ? a : b);