diff options
author | ghostop14 <ghostop14@gmail.com> | 2020-02-14 11:47:37 -0500 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-02-15 14:25:57 +0100 |
commit | 504ab76d9e4fc3e9f497b9fd34f01c1bad346a5d (patch) | |
tree | c64edca089a87217e56d8840a38382d7e2b4ec56 /gr-digital/lib/clock_recovery_mm_cc_impl.cc | |
parent | a56c3a7f4908133dc6ceb93ffd3b2f9e1dda8e0e (diff) |
gr-digital: Improve PLL Loops and Clock Recovery
These updates incorporate the same inlining of loop functions and
the newly pushed fast_cc_multiply function to ensure
consistent performance improvements across systems that do not
support the cx-limited-range compiler parameter (Macs and Windows).
Diffstat (limited to 'gr-digital/lib/clock_recovery_mm_cc_impl.cc')
-rw-r--r-- | gr-digital/lib/clock_recovery_mm_cc_impl.cc | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/gr-digital/lib/clock_recovery_mm_cc_impl.cc b/gr-digital/lib/clock_recovery_mm_cc_impl.cc index 0c1b7e0892..4f2f4c0c58 100644 --- a/gr-digital/lib/clock_recovery_mm_cc_impl.cc +++ b/gr-digital/lib/clock_recovery_mm_cc_impl.cc @@ -74,27 +74,6 @@ void clock_recovery_mm_cc_impl::forecast(int noutput_items, (int)ceil((noutput_items * d_omega) + d_interp->ntaps()) + FUDGE; } -gr_complex clock_recovery_mm_cc_impl::slicer_0deg(gr_complex sample) -{ - float real = 0, imag = 0; - - if (sample.real() > 0) - real = 1; - if (sample.imag() > 0) - imag = 1; - return gr_complex(real, imag); -} - -gr_complex clock_recovery_mm_cc_impl::slicer_45deg(gr_complex sample) -{ - float real = -1, imag = -1; - if (sample.real() > 0) - real = 1; - if (sample.imag() > 0) - imag = 1; - return gr_complex(real, imag); -} - void clock_recovery_mm_cc_impl::set_omega(float omega) { d_omega = omega; @@ -135,8 +114,8 @@ int clock_recovery_mm_cc_impl::general_work(int noutput_items, d_c_1T = d_c_0T; d_c_0T = slicer_0deg(d_p_0T); - x = (d_c_0T - d_c_2T) * conj(d_p_1T); - y = (d_p_0T - d_p_2T) * conj(d_c_1T); + fast_cc_multiply(x, d_c_0T - d_c_2T, conj(d_p_1T)); + fast_cc_multiply(y, d_p_0T - d_p_2T, conj(d_c_1T)); u = y - x; mm_val = u.real(); out[oo++] = d_p_0T; @@ -169,8 +148,8 @@ int clock_recovery_mm_cc_impl::general_work(int noutput_items, d_c_1T = d_c_0T; d_c_0T = slicer_0deg(d_p_0T); - x = (d_c_0T - d_c_2T) * conj(d_p_1T); - y = (d_p_0T - d_p_2T) * conj(d_c_1T); + fast_cc_multiply(x, d_c_0T - d_c_2T, conj(d_p_1T)); + fast_cc_multiply(y, d_p_0T - d_p_2T, conj(d_c_1T)); u = y - x; mm_val = u.real(); out[oo++] = d_p_0T; |