From aa0bd44efbf8afdfd93d627e486c1427426b76f9 Mon Sep 17 00:00:00 2001
From: ghostop14 <ghostop14@gmail.com>
Date: Wed, 29 Jan 2020 17:20:16 -0500
Subject: gr-digital: Improve Performance of Costas Loop

This update is focused on improving the throughput of the Costas
loop, however some changes are more global performance enhancements
as this PR has evolved.  Updates include an ENABLE_NATIVE added to
CMake, which is off by default but enables native compiling (including
FMA support) if desired; sincos was inlined in sincos.h and sincos.cc
was removed from the appropriate CMake to improve sincos speed, some
constants were added to math.h, inlined functions in costas loop and
nco.h, used switch instead of function pointer (much faster), and
used fast complex multiply to get around all the range checking in
the standard complex.h complex multiply function on all builds.
---
 gr-blocks/lib/control_loop.cc | 22 ----------------------
 1 file changed, 22 deletions(-)

(limited to 'gr-blocks/lib/control_loop.cc')

diff --git a/gr-blocks/lib/control_loop.cc b/gr-blocks/lib/control_loop.cc
index 099bc20fb9..f98d0c795b 100644
--- a/gr-blocks/lib/control_loop.cc
+++ b/gr-blocks/lib/control_loop.cc
@@ -40,28 +40,6 @@ void control_loop::update_gains()
     d_beta = (4 * d_loop_bw * d_loop_bw) / denom;
 }
 
-void control_loop::advance_loop(float error)
-{
-    d_freq = d_freq + d_beta * error;
-    d_phase = d_phase + d_freq + d_alpha * error;
-}
-
-void control_loop::phase_wrap()
-{
-    while (d_phase > M_TWOPI)
-        d_phase -= M_TWOPI;
-    while (d_phase < -M_TWOPI)
-        d_phase += M_TWOPI;
-}
-
-void control_loop::frequency_limit()
-{
-    if (d_freq > d_max_freq)
-        d_freq = d_max_freq;
-    else if (d_freq < d_min_freq)
-        d_freq = d_min_freq;
-}
-
 /*******************************************************************
  * SET FUNCTIONS
  *******************************************************************/
-- 
cgit v1.2.3