summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/add_const_cc_impl.h
diff options
context:
space:
mode:
authorGrant Cox <grant.cox@deepspaceamps.com>2019-11-20 23:18:56 -0600
committerMartin Braun <martin.braun@ettus.com>2020-01-04 23:32:42 -0800
commitebe8ffc58503a1b4f167a13d5663e8849379eaaf (patch)
treecd7b03d36b79966cf9b967bd4305da0bcb5149b1 /gr-blocks/lib/add_const_cc_impl.h
parent27a466a9c8a03392270fadde9e5bafef5c062e61 (diff)
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].
Diffstat (limited to 'gr-blocks/lib/add_const_cc_impl.h')
-rw-r--r--gr-blocks/lib/add_const_cc_impl.h4
1 files changed, 3 insertions, 1 deletions
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,