1 #ifndef INCLUDED_volk_32f_x2_max_32f_a_H
2 #define INCLUDED_volk_32f_x2_max_32f_a_H
16 static inline void volk_32f_x2_max_32f_a_sse(
float* cVector,
const float* aVector,
const float* bVector,
unsigned int num_points){
17 unsigned int number = 0;
18 const unsigned int quarterPoints = num_points / 4;
20 float* cPtr = cVector;
21 const float* aPtr = aVector;
22 const float* bPtr= bVector;
24 __m128 aVal, bVal, cVal;
25 for(;number < quarterPoints; number++){
27 aVal = _mm_load_ps(aPtr);
28 bVal = _mm_load_ps(bPtr);
30 cVal = _mm_max_ps(aVal, bVal);
32 _mm_store_ps(cPtr,cVal);
39 number = quarterPoints * 4;
40 for(;number < num_points; number++){
41 const float a = *aPtr++;
42 const float b = *bPtr++;
43 *cPtr++ = ( a > b ? a : b);
48 #ifdef LV_HAVE_GENERIC
56 static inline void volk_32f_x2_max_32f_generic(
float* cVector,
const float* aVector,
const float* bVector,
unsigned int num_points){
57 float* cPtr = cVector;
58 const float* aPtr = aVector;
59 const float* bPtr= bVector;
60 unsigned int number = 0;
62 for(number = 0; number < num_points; number++){
63 const float a = *aPtr++;
64 const float b = *bPtr++;
65 *cPtr++ = ( a > b ? a : b);
78 extern void volk_32f_x2_max_32f_a_orc_impl(
float* cVector,
const float* aVector,
const float* bVector,
unsigned int num_points);
79 static inline void volk_32f_x2_max_32f_u_orc(
float* cVector,
const float* aVector,
const float* bVector,
unsigned int num_points){
80 volk_32f_x2_max_32f_a_orc_impl(cVector, aVector, bVector, num_points);