commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 21/22: volk: relax log2 qa constraints and


From: git
Subject: [Commit-gnuradio] [gnuradio] 21/22: volk: relax log2 qa constraints and use a higher order polynomial
Date: Fri, 31 Oct 2014 19:22:32 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit 0c92479f10274e9e5f4e1506dafe4d515576ee8a
Author: Nathan West <address@hidden>
Date:   Thu Oct 30 16:37:47 2014 -0500

    volk: relax log2 qa constraints and use a higher order polynomial
---
 volk/kernels/volk/volk_32f_log2_32f.h | 38 +++++++++++++++++------------------
 volk/lib/testqa.cc                    |  2 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/volk/kernels/volk/volk_32f_log2_32f.h 
b/volk/kernels/volk/volk_32f_log2_32f.h
index 9452d35..892eeb1 100644
--- a/volk/kernels/volk/volk_32f_log2_32f.h
+++ b/volk/kernels/volk/volk_32f_log2_32f.h
@@ -61,7 +61,7 @@
 #define POLY4(x, c0, c1, c2, c3, c4) _mm_add_ps(_mm_mul_ps(POLY3(x, c1, c2, 
c3, c4), x), _mm_set1_ps(c0))
 #define POLY5(x, c0, c1, c2, c3, c4, c5) _mm_add_ps(_mm_mul_ps(POLY4(x, c1, 
c2, c3, c4, c5), x), _mm_set1_ps(c0))
 
-#define LOG_POLY_DEGREE 3
+#define LOG_POLY_DEGREE 6
 
 
 #ifndef INCLUDED_volk_32f_log2_32f_a_H
@@ -251,24 +251,24 @@ static inline void volk_32f_log2_32f_neon(float* bVector, 
const float* aVector,
 #define INCLUDED_volk_32f_log2_32f_u_H
 
 
-//#ifdef LV_HAVE_GENERIC
-///*!
-//  \brief Computes base 2 log of input vector and stores results in output 
vector
-//  \param bVector The vector where results will be stored
-//  \param aVector The input vector of floats
-//  \param num_points Number of points for which log is to be computed
-//*/
-//static inline void volk_32f_log2_32f_u_generic(float* bVector, const float* 
aVector, unsigned int num_points){
-//    float* bPtr = bVector;
-//    const float* aPtr = aVector;
-//    unsigned int number = 0;
-//
-//    for(number = 0; number < num_points; number++){
-//      *bPtr++ = log2(*aPtr++);
-//    }
-//
-//}
-//#endif /* LV_HAVE_GENERIC */
+#ifdef LV_HAVE_GENERIC
+/*!
+  \brief Computes base 2 log of input vector and stores results in output 
vector
+  \param bVector The vector where results will be stored
+  \param aVector The input vector of floats
+  \param num_points Number of points for which log is to be computed
+*/
+static inline void volk_32f_log2_32f_u_generic(float* bVector, const float* 
aVector, unsigned int num_points){
+    float* bPtr = bVector;
+    const float* aPtr = aVector;
+    unsigned int number = 0;
+
+    for(number = 0; number < num_points; number++){
+      *bPtr++ = log2(*aPtr++);
+    }
+
+}
+#endif /* LV_HAVE_GENERIC */
 
 
 #ifdef LV_HAVE_SSE4_1
diff --git a/volk/lib/testqa.cc b/volk/lib/testqa.cc
index a3d8766..7807ce4 100644
--- a/volk/lib/testqa.cc
+++ b/volk/lib/testqa.cc
@@ -44,7 +44,7 @@ VOLK_RUN_TESTS(volk_16u_byteswap, 0, 0, 20462, 1);
 VOLK_RUN_TESTS(volk_32f_accumulator_s32f, 1e-4, 0, 20462, 1);
 VOLK_RUN_TESTS(volk_32f_x2_add_32f, 1e-4, 0, 20462, 1);
 VOLK_RUN_TESTS(volk_32fc_32f_multiply_32fc, 1e-4, 0, 20462, 1);
-VOLK_RUN_TESTS(volk_32f_log2_32f, 1e-3, 0, 20462, 1);
+VOLK_RUN_TESTS(volk_32f_log2_32f, 1.5e-1, 0, 20462, 1);
 VOLK_RUN_TESTS(volk_32f_expfast_32f, 1e-1, 0, 20462, 1);
 VOLK_RUN_TESTS(volk_32f_x2_pow_32f, 1e-2, 0, 20462, 1);
 VOLK_RUN_TESTS(volk_32f_sin_32f, 1e-6, 0, 20462, 1);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]