1 #ifndef INCLUDED_volk_32f_invsqrt_32f_a_H
2 #define INCLUDED_volk_32f_invsqrt_32f_a_H
9 static inline float Q_rsqrt(
float number )
12 const float threehalfs = 1.5F;
20 u.i = 0x5f3759df - ( u.i >> 1 );
21 u.f = u.f * ( threehalfs - ( x2 * u.f * u.f ) );
28 #include <xmmintrin.h>
35 static inline void volk_32f_invsqrt_32f_a_sse(
float* cVector,
const float* aVector,
unsigned int num_points){
36 unsigned int number = 0;
37 const unsigned int quarterPoints = num_points / 4;
39 float* cPtr = cVector;
40 const float* aPtr = aVector;
43 for(;number < quarterPoints; number++){
45 aVal = _mm_load_ps(aPtr);
47 cVal = _mm_rsqrt_ps(aVal);
49 _mm_store_ps(cPtr,cVal);
55 number = quarterPoints * 4;
56 for(;number < num_points; number++){
62 #ifdef LV_HAVE_GENERIC
69 static inline void volk_32f_invsqrt_32f_generic(
float* cVector,
const float* aVector,
unsigned int num_points){
70 float* cPtr = cVector;
71 const float* aPtr = aVector;
72 unsigned int number = 0;
73 for(number = 0; number < num_points; number++){
static float Q_rsqrt(float number)
Definition: volk_32f_invsqrt_32f.h:9
signed int int32_t
Definition: stdint.h:77