1 #ifndef INCLUDED_volk_64f_x2_max_64f_a_H
2 #define INCLUDED_volk_64f_x2_max_64f_a_H
16 static inline void volk_64f_x2_max_64f_a_sse2(
double* cVector,
const double* aVector,
const double* bVector,
unsigned int num_points){
17 unsigned int number = 0;
18 const unsigned int halfPoints = num_points / 2;
20 double* cPtr = cVector;
21 const double* aPtr = aVector;
22 const double* bPtr= bVector;
24 __m128d aVal, bVal, cVal;
25 for(;number < halfPoints; number++){
27 aVal = _mm_load_pd(aPtr);
28 bVal = _mm_load_pd(bPtr);
30 cVal = _mm_max_pd(aVal, bVal);
32 _mm_store_pd(cPtr,cVal);
39 number = halfPoints * 2;
40 for(;number < num_points; number++){
41 const double a = *aPtr++;
42 const double b = *bPtr++;
43 *cPtr++ = ( a > b ? a : b);
48 #ifdef LV_HAVE_GENERIC
56 static inline void volk_64f_x2_max_64f_generic(
double* cVector,
const double* aVector,
const double* bVector,
unsigned int num_points){
57 double* cPtr = cVector;
58 const double* aPtr = aVector;
59 const double* bPtr= bVector;
60 unsigned int number = 0;
62 for(number = 0; number < num_points; number++){
63 const double a = *aPtr++;
64 const double b = *bPtr++;
65 *cPtr++ = ( a > b ? a : b);