diff options
author | Tom Rondeau | 2013-03-29 13:12:36 -0400 |
---|---|---|
committer | Johnathan Corgan | 2013-03-29 10:55:06 -0700 |
commit | 78cd4026c0a9b902162e94905b60a9dd44a07bb7 (patch) | |
tree | e723d38d7b19b13d3c713868d755f2c48e84c726 /gnuradio-core/src/lib/runtime | |
parent | 91714eaa1fd33f4f801a9a8dedbd6832c01b1204 (diff) | |
download | gnuradio-78cd4026c0a9b902162e94905b60a9dd44a07bb7.tar.gz gnuradio-78cd4026c0a9b902162e94905b60a9dd44a07bb7.tar.bz2 gnuradio-78cd4026c0a9b902162e94905b60a9dd44a07bb7.zip |
core: addressing issue #529. Using vector<int> instead of vector<unsigned int> for affinity mask vector.
This is wrong as the mask should be unsigned, but necessary for SWIG to work cleanly on both 32-bit and 64-bit platforms.
Diffstat (limited to 'gnuradio-core/src/lib/runtime')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block.h | 8 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block.i | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block_detail.cc | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block_detail.h | 4 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/qa_gr_top_block.cc | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block.cc b/gnuradio-core/src/lib/runtime/gr_block.cc index 54d267620..587e9d195 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.cc +++ b/gnuradio-core/src/lib/runtime/gr_block.cc @@ -253,7 +253,7 @@ gr_block::is_set_max_noutput_items() } void -gr_block::set_processor_affinity(const std::vector<unsigned int> &mask) +gr_block::set_processor_affinity(const std::vector<int> &mask) { d_affinity = mask; if(d_detail) { diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h index 0783e8684..c5e510c3b 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.h +++ b/gnuradio-core/src/lib/runtime/gr_block.h @@ -458,9 +458,9 @@ class GR_CORE_API gr_block : public gr_basic_block { /*! * \brief Set the thread's affinity to processor core \p n. * - * \param mask a vector of unsigned ints of the core numbers available to this block. + * \param mask a vector of ints of the core numbers available to this block. */ - void set_processor_affinity(const std::vector<unsigned int> &mask); + void set_processor_affinity(const std::vector<int> &mask); /*! * \brief Remove processor affinity to a specific core. @@ -470,7 +470,7 @@ class GR_CORE_API gr_block : public gr_basic_block { /*! * \brief Get the current processor affinity. */ - std::vector<unsigned int> processor_affinity() { return d_affinity; } + std::vector<int> processor_affinity() { return d_affinity; } // ---------------------------------------------------------------------------- @@ -488,7 +488,7 @@ class GR_CORE_API gr_block : public gr_basic_block { int d_max_noutput_items; // value of max_noutput_items for this block int d_min_noutput_items; tag_propagation_policy_t d_tag_propagation_policy; // policy for moving tags downstream - std::vector<unsigned int> d_affinity; // thread affinity proc. mask + std::vector<int> d_affinity; // thread affinity proc. mask protected: gr_block (void){} //allows pure virtual interface sub-classes diff --git a/gnuradio-core/src/lib/runtime/gr_block.i b/gnuradio-core/src/lib/runtime/gr_block.i index a80f64d02..a53489f9a 100644 --- a/gnuradio-core/src/lib/runtime/gr_block.i +++ b/gnuradio-core/src/lib/runtime/gr_block.i @@ -83,9 +83,9 @@ class gr_block : public gr_basic_block { float pc_work_time_var(); // Methods to manage processor affinity. - void set_processor_affinity(const gr_vector_uint &mask); + void set_processor_affinity(const std::vector<int> &mask); void unset_processor_affinity(); - gr_vector_uint processor_affinity(); + std::vector<int> processor_affinity(); // internal use gr_block_detail_sptr detail () const { return d_detail; } diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.cc b/gnuradio-core/src/lib/runtime/gr_block_detail.cc index 82081039a..af80e61cf 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.cc @@ -215,7 +215,7 @@ gr_block_detail::get_tags_in_range(std::vector<gr_tag_t> &v, } void -gr_block_detail::set_processor_affinity(const std::vector<unsigned int> &mask) +gr_block_detail::set_processor_affinity(const std::vector<int> &mask) { if(threaded) { try { diff --git a/gnuradio-core/src/lib/runtime/gr_block_detail.h b/gnuradio-core/src/lib/runtime/gr_block_detail.h index 32a01e763..15d85135a 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_detail.h +++ b/gnuradio-core/src/lib/runtime/gr_block_detail.h @@ -159,9 +159,9 @@ class GR_CORE_API gr_block_detail { /*! * \brief Set core affinity of block to the cores in the vector mask. * - * \param mask a vector of unsigned ints of the core numbers available to this block. + * \param mask a vector of ints of the core numbers available to this block. */ - void set_processor_affinity(const std::vector<unsigned int> &mask); + void set_processor_affinity(const std::vector<int> &mask); /*! * \brief Unset core affinity. diff --git a/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc b/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc index 1d3dafadf..6bbc9ceb8 100644 --- a/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc +++ b/gnuradio-core/src/lib/runtime/qa_gr_top_block.cc @@ -269,7 +269,7 @@ void qa_gr_top_block::t11_set_block_affinity() gr_block_sptr src (gr_make_null_source(sizeof(float))); gr_block_sptr snk (gr_make_null_sink(sizeof(float))); - std::vector<unsigned int> set(1, 0), ret; + std::vector<int> set(1, 0), ret; src->set_processor_affinity(set); tb->connect(src, 0, snk, 0); |