From ebe8ffc58503a1b4f167a13d5663e8849379eaaf Mon Sep 17 00:00:00 2001 From: Grant Cox <grant.cox@deepspaceamps.com> Date: Wed, 20 Nov 2019 23:18:56 -0600 Subject: gr-blocks: VOLKize add_const_ff implementation - Use volk_32fc_x2_add_32fc to volk add constants to the input vector of the block - use volk::vector in add_const_ff_impl: Rather than using float* for variable length vector addition in volk, use volk::vector<float> for easier resizing. - Use scoped_lock when modifying private data members in add_const_ff_impl.cc. Remove getter functions for the d_k_copy vector. Cast with static_cast rather than typical cast. Use vector.data() rather than &vector[0]. --- gr-blocks/lib/add_const_cc_impl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gr-blocks/lib/add_const_cc_impl.h') diff --git a/gr-blocks/lib/add_const_cc_impl.h b/gr-blocks/lib/add_const_cc_impl.h index 075328fc2a..7f2adf34dc 100644 --- a/gr-blocks/lib/add_const_cc_impl.h +++ b/gr-blocks/lib/add_const_cc_impl.h @@ -32,6 +32,7 @@ class BLOCKS_API add_const_cc_impl : public add_const_cc { private: gr_complex d_k; + volk::vector<gr_complex> d_k_copy; public: add_const_cc_impl(gr_complex k); @@ -39,7 +40,8 @@ public: void setup_rpc(); gr_complex k() const { return d_k; } - void set_k(gr_complex k) { d_k = k; } + + void set_k(gr_complex k); int work(int noutput_items, gr_vector_const_void_star& input_items, -- cgit v1.2.3