Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 939065 Details for
Bug 1143914
gnuradio: build fails on s390
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch sent upstream
gnuradio-3.7.5-size_t.patch (text/plain), 16.53 KB, created by
Jaroslav Škarvada
on 2014-09-18 23:32:20 UTC
(
hide
)
Description:
Proposed patch sent upstream
Filename:
MIME Type:
Creator:
Jaroslav Škarvada
Created:
2014-09-18 23:32:20 UTC
Size:
16.53 KB
patch
obsolete
>diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake >index abf4dc4..1993ee6 100644 >--- a/cmake/Modules/GrSwig.cmake >+++ b/cmake/Modules/GrSwig.cmake >@@ -105,18 +105,6 @@ endfunction(GR_SWIG_MAKE_DOCS) > macro(GR_SWIG_MAKE name) > set(ifiles ${ARGN}) > >- # Shimming this in here to take care of a SWIG bug with handling >- # vector<size_t> and vector<unsigned int> (on 32-bit machines) and >- # vector<long unsigned int> (on 64-bit machines). Use this to test >- # the size of size_t, then set SIZE_T_32 if it's a 32-bit machine >- # or not if it's 64-bit. The logic in gr_type.i handles the rest. >- INCLUDE(CheckTypeSize) >- CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T) >- CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT) >- if(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) >- list(APPEND GR_SWIG_FLAGS -DSIZE_T_32) >- endif(${SIZEOF_SIZE_T} EQUAL ${SIZEOF_UINT}) >- > #do swig doc generation if specified > if(GR_SWIG_DOC_FILE) > set(GR_SWIG_DOCS_SOURCE_DEPS ${GR_SWIG_SOURCE_DEPS}) >diff --git a/docs/doxygen/other/thread_affinity.dox b/docs/doxygen/other/thread_affinity.dox >index edac813..8dcd658 100644 >--- a/docs/doxygen/other/thread_affinity.dox >+++ b/docs/doxygen/other/thread_affinity.dox >@@ -50,7 +50,7 @@ Each block has two new data members: > A block can set and unset its affinity at any time using the > following member functions: > >-- gr::block::set_processor_affinity(const std::vector<int> &mask) >+- gr::block::set_processor_affinity(const std::vector<std::size_t> &mask) > - gr::block::unset_processor_affinity() > > Where \p mask is a vector of core numbers to set the thread's affinity >@@ -76,7 +76,7 @@ to that affinity setting. > The gr::hier_block2 class supports the same API interface to the block > thread affinity: > >-- gr::hier_block2::set_processor_affinity(const std::vector<int> &mask) >+- gr::hier_block2::set_processor_affinity(const std::vector<std::size_t> &mask) > - gr::hier_block2::unset_processor_affinity() > - gr::hier_block2::processor_affinity() > >diff --git a/gnuradio-runtime/include/gnuradio/basic_block.h b/gnuradio-runtime/include/gnuradio/basic_block.h >index 066257d..93d40ff 100644 >--- a/gnuradio-runtime/include/gnuradio/basic_block.h >+++ b/gnuradio-runtime/include/gnuradio/basic_block.h >@@ -375,13 +375,13 @@ namespace gr { > d_msg_handlers[which_port] = msg_handler_t(msg_handler); > } > >- virtual void set_processor_affinity(const std::vector<int> &mask) >+ virtual void set_processor_affinity(const std::vector<std::size_t> &mask) > { throw std::runtime_error("set_processor_affinity not overloaded in child class."); } > > virtual void unset_processor_affinity() > { throw std::runtime_error("unset_processor_affinity not overloaded in child class."); } > >- virtual std::vector<int> processor_affinity() >+ virtual std::vector<std::size_t> processor_affinity() > { throw std::runtime_error("processor_affinity not overloaded in child class."); } > }; > >diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h >index a033e0a..54dcd6a 100644 >--- a/gnuradio-runtime/include/gnuradio/block.h >+++ b/gnuradio-runtime/include/gnuradio/block.h >@@ -532,9 +532,9 @@ namespace gr { > /*! > * \brief Set the thread's affinity to processor core \p n. > * >- * \param mask a vector of ints of the core numbers available to this block. >+ * \param mask a vector of std::size_t of the core numbers available to this block. > */ >- void set_processor_affinity(const std::vector<int> &mask); >+ void set_processor_affinity(const std::vector<std::size_t> &mask); > > /*! > * \brief Remove processor affinity to a specific core. >@@ -544,7 +544,7 @@ namespace gr { > /*! > * \brief Get the current processor affinity. > */ >- std::vector<int> processor_affinity() { return d_affinity; } >+ std::vector<std::size_t> processor_affinity() { return d_affinity; } > > /*! > * \brief Get the current thread priority in use >@@ -589,7 +589,7 @@ namespace gr { > 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<int> d_affinity; // thread affinity proc. mask >+ std::vector<std::size_t> d_affinity; // thread affinity proc. mask > int d_priority; // thread priority level > bool d_pc_rpc_set; > bool d_update_rate; // should sched update rel rate? >diff --git a/gnuradio-runtime/include/gnuradio/block_detail.h b/gnuradio-runtime/include/gnuradio/block_detail.h >index 41568c8..b725784 100644 >--- a/gnuradio-runtime/include/gnuradio/block_detail.h >+++ b/gnuradio-runtime/include/gnuradio/block_detail.h >@@ -174,10 +174,10 @@ namespace gr { > * \brief Set core affinity of block to the cores in the vector > * mask. > * >- * \param mask a vector of ints of the core numbers available to >+ * \param mask a vector of std::size_t of the core numbers available to > * this block. > */ >- void set_processor_affinity(const std::vector<int> &mask); >+ void set_processor_affinity(const std::vector<std::size_t> &mask); > > /*! > * \brief Unset core affinity. >diff --git a/gnuradio-runtime/include/gnuradio/hier_block2.h b/gnuradio-runtime/include/gnuradio/hier_block2.h >index 1bf8ddd..d847b71 100644 >--- a/gnuradio-runtime/include/gnuradio/hier_block2.h >+++ b/gnuradio-runtime/include/gnuradio/hier_block2.h >@@ -216,7 +216,7 @@ namespace gr { > * > * \param mask a vector of ints of the core numbers available to this block. > */ >- void set_processor_affinity(const std::vector<int> &mask); >+ void set_processor_affinity(const std::vector<std::size_t> &mask); > > /*! > * \brief Remove processor affinity for all blocks in hier_block2. >@@ -232,7 +232,7 @@ namespace gr { > * interface. If any block has been individually set, then this > * call could be misleading. > */ >- std::vector<int> processor_affinity(); >+ std::vector<std::size_t> processor_affinity(); > }; > > /*! >diff --git a/gnuradio-runtime/include/gnuradio/thread/thread.h b/gnuradio-runtime/include/gnuradio/thread/thread.h >index a58d172..b0fe00a 100644 >--- a/gnuradio-runtime/include/gnuradio/thread/thread.h >+++ b/gnuradio-runtime/include/gnuradio/thread/thread.h >@@ -77,7 +77,7 @@ namespace gr { > * do support in this way since 10.5 is not what we want or can > * use in this fashion). > */ >- GR_RUNTIME_API void thread_bind_to_processor(const std::vector<int> &mask); >+ GR_RUNTIME_API void thread_bind_to_processor(const std::vector<std::size_t> &mask); > > /*! \brief Convineince function to bind the current thread to a single core. > * >@@ -89,7 +89,7 @@ namespace gr { > * do support in this way since 10.5 is not what we want or can > * use in this fashion). > */ >- GR_RUNTIME_API void thread_bind_to_processor(int n); >+ GR_RUNTIME_API void thread_bind_to_processor(std::size_t n); > > /*! \brief Bind a thread to a set of cores. > * >@@ -104,7 +104,7 @@ namespace gr { > * use in this fashion). > */ > GR_RUNTIME_API void thread_bind_to_processor(gr_thread_t thread, >- const std::vector<int> &mask); >+ const std::vector<std::size_t> &mask); > > > /*! \brief Convineince function to bind the a thread to a single core. >diff --git a/gnuradio-runtime/lib/block.cc b/gnuradio-runtime/lib/block.cc >index a15fb89..24ae26a 100644 >--- a/gnuradio-runtime/lib/block.cc >+++ b/gnuradio-runtime/lib/block.cc >@@ -325,7 +325,7 @@ namespace gr { > } > > void >- block::set_processor_affinity(const std::vector<int> &mask) >+ block::set_processor_affinity(const std::vector<std::size_t> &mask) > { > d_affinity = mask; > if(d_detail) { >diff --git a/gnuradio-runtime/lib/block_detail.cc b/gnuradio-runtime/lib/block_detail.cc >index 77c457c..33136a4 100644 >--- a/gnuradio-runtime/lib/block_detail.cc >+++ b/gnuradio-runtime/lib/block_detail.cc >@@ -220,7 +220,7 @@ namespace gr { > } > > void >- block_detail::set_processor_affinity(const std::vector<int> &mask) >+ block_detail::set_processor_affinity(const std::vector<std::size_t> &mask) > { > if(threaded) { > try { >diff --git a/gnuradio-runtime/lib/hier_block2.cc b/gnuradio-runtime/lib/hier_block2.cc >index f145b93..f4bc460 100644 >--- a/gnuradio-runtime/lib/hier_block2.cc >+++ b/gnuradio-runtime/lib/hier_block2.cc >@@ -159,7 +159,7 @@ namespace gr { > } > > void >- hier_block2::set_processor_affinity(const std::vector<int> &mask) >+ hier_block2::set_processor_affinity(const std::vector<std::size_t> &mask) > { > d_detail->set_processor_affinity(mask); > } >@@ -170,7 +170,7 @@ namespace gr { > d_detail->unset_processor_affinity(); > } > >- std::vector<int> >+ std::vector<std::size_t> > hier_block2::processor_affinity() > { > return d_detail->processor_affinity(); >diff --git a/gnuradio-runtime/lib/hier_block2_detail.cc b/gnuradio-runtime/lib/hier_block2_detail.cc >index ad8fc87..bf3e8c4 100644 >--- a/gnuradio-runtime/lib/hier_block2_detail.cc >+++ b/gnuradio-runtime/lib/hier_block2_detail.cc >@@ -685,7 +685,7 @@ namespace gr { > } > > void >- hier_block2_detail::set_processor_affinity(const std::vector<int> &mask) >+ hier_block2_detail::set_processor_affinity(const std::vector<std::size_t> &mask) > { > basic_block_vector_t tmp = d_fg->calc_used_blocks(); > for(basic_block_viter_t p = tmp.begin(); p != tmp.end(); p++) { >@@ -702,7 +702,7 @@ namespace gr { > } > } > >- std::vector<int> >+ std::vector<std::size_t> > hier_block2_detail::processor_affinity() > { > basic_block_vector_t tmp = d_fg->calc_used_blocks(); >diff --git a/gnuradio-runtime/lib/hier_block2_detail.h b/gnuradio-runtime/lib/hier_block2_detail.h >index 8067383..edd11be 100644 >--- a/gnuradio-runtime/lib/hier_block2_detail.h >+++ b/gnuradio-runtime/lib/hier_block2_detail.h >@@ -54,9 +54,9 @@ namespace gr { > void unlock(); > void flatten_aux(flat_flowgraph_sptr sfg) const; > >- void set_processor_affinity(const std::vector<int> &mask); >+ void set_processor_affinity(const std::vector<std::size_t> &mask); > void unset_processor_affinity(); >- std::vector<int> processor_affinity(); >+ std::vector<std::size_t> processor_affinity(); > > private: > // Private implementation data >diff --git a/gnuradio-runtime/lib/thread/thread.cc b/gnuradio-runtime/lib/thread/thread.cc >index 483dfed..6e94b2b 100644 >--- a/gnuradio-runtime/lib/thread/thread.cc >+++ b/gnuradio-runtime/lib/thread/thread.cc >@@ -40,33 +40,33 @@ namespace gr { > } > > void >- thread_bind_to_processor(int n) >+ thread_bind_to_processor(std::size_t n) > { >- std::vector<int> mask(1, n); >+ std::vector<std::size_t> mask(1, n); > thread_bind_to_processor(get_current_thread_id(), mask); > } > > void >- thread_bind_to_processor(const std::vector<int> &mask) >+ thread_bind_to_processor(const std::vector<std::size_t> &mask) > { > thread_bind_to_processor(get_current_thread_id(), mask); > } > > void >- thread_bind_to_processor(gr_thread_t thread, int n) >+ thread_bind_to_processor(gr_thread_t thread, std::size_t n) > { >- std::vector<int> mask(1, n); >+ std::vector<std::size_t> mask(1, n); > thread_bind_to_processor(thread, mask); > } > > void >- thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask) >+ thread_bind_to_processor(gr_thread_t thread, const std::vector<std::size_t> &mask) > { > //DWORD_PTR mask = (1 << n); > DWORD_PTR dword_mask = 0; > >- std::vector<int> _mask = mask; >- std::vector<int>::iterator itr; >+ std::vector<std::size_t> _mask = mask; >+ std::vector<std::size_t>::iterator itr; > for(itr = _mask.begin(); itr != _mask.end(); itr++) > dword_mask |= (1 << (*itr)); > >@@ -171,25 +171,25 @@ namespace gr { > } > > void >- thread_bind_to_processor(int n) >+ thread_bind_to_processor(std::size_t n) > { > // Not implemented on OSX > } > > void >- thread_bind_to_processor(gr_thread_t thread, int n) >+ thread_bind_to_processor(gr_thread_t thread, std::size_t n) > { > // Not implemented on OSX > } > > void >- thread_bind_to_processor(const std::vector<int> &mask) >+ thread_bind_to_processor(const std::vector<std::size_t> &mask) > { > // Not implemented on OSX > } > > void >- thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask) >+ thread_bind_to_processor(gr_thread_t thread, const std::vector<std::size_t> &mask) > { > // Not implemented on OSX > } >@@ -254,32 +254,32 @@ namespace gr { > } > > void >- thread_bind_to_processor(int n) >+ thread_bind_to_processor(std::size_t n) > { >- std::vector<int> mask(1, n); >+ std::vector<std::size_t> mask(1, n); > thread_bind_to_processor(get_current_thread_id(), mask); > } > > void >- thread_bind_to_processor(const std::vector<int> &mask) >+ thread_bind_to_processor(const std::vector<std::size_t> &mask) > { > thread_bind_to_processor(get_current_thread_id(), mask); > } > > void >- thread_bind_to_processor(gr_thread_t thread, int n) >+ thread_bind_to_processor(gr_thread_t thread, std::size_t n) > { >- std::vector<int> mask(1, n); >+ std::vector<std::size_t> mask(1, n); > thread_bind_to_processor(thread, mask); > } > > void >- thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask) >+ thread_bind_to_processor(gr_thread_t thread, const std::vector<std::size_t> &mask) > { > cpu_set_t set; > size_t len = sizeof(cpu_set_t); >- std::vector<int> _mask = mask; >- std::vector<int>::iterator itr; >+ std::vector<std::size_t> _mask = mask; >+ std::vector<std::size_t>::iterator itr; > > CPU_ZERO(&set); > for(itr = _mask.begin(); itr != _mask.end(); itr++) >diff --git a/gnuradio-runtime/swig/block.i b/gnuradio-runtime/swig/block.i >index 9f3f374..410421d 100644 >--- a/gnuradio-runtime/swig/block.i >+++ b/gnuradio-runtime/swig/block.i >@@ -98,9 +98,9 @@ class gr::block : public gr::basic_block > float pc_work_time_total(); > > // Methods to manage processor affinity. >- void set_processor_affinity(const std::vector<int> &mask); >+ void set_processor_affinity(const std::vector<std::size_t> &mask); > void unset_processor_affinity(); >- std::vector<int> processor_affinity(); >+ std::vector<std::size_t> processor_affinity(); > > // Methods to manage thread priority > int active_thread_priority(); >diff --git a/gnuradio-runtime/swig/gr_types.i b/gnuradio-runtime/swig/gr_types.i >index 8ae953b..fa2c764 100644 >--- a/gnuradio-runtime/swig/gr_types.i >+++ b/gnuradio-runtime/swig/gr_types.i >@@ -80,15 +80,4 @@ namespace std { > %template(gr_vector_vector_complexf) std::vector< std::vector< std::complex<float> > >; > %template(gr_vector_vector_complexd) std::vector< std::vector< std::complex<double> > >; > >-// Fix for Issue #529 >-#ifdef SIZE_T_32 >- // On 32-bit systems, whenever we see std::vector<size_t>, replace it >- // with vector<unsigned int> >- %apply std::vector<unsigned int> { std::vector<size_t> }; >-#else >- // On 64-bit systems, whenever we see std::vector<size_t>, replace it >- // with vector<long unsigned int> >- %apply std::vector<long unsigned int> { std::vector<size_t> }; >-#endif >- > #endif /* SWIG_GR_TYPES_I */ >diff --git a/gnuradio-runtime/swig/hier_block2.i b/gnuradio-runtime/swig/hier_block2.i >index 053f247..f96432c 100644 >--- a/gnuradio-runtime/swig/hier_block2.i >+++ b/gnuradio-runtime/swig/hier_block2.i >@@ -87,9 +87,9 @@ namespace gr { > void message_port_register_hier_in(pmt::pmt_t port_id); > void message_port_register_hier_out(pmt::pmt_t port_id); > >- void set_processor_affinity(const std::vector<int> &mask); >+ void set_processor_affinity(const std::vector<std::size_t> &mask); > void unset_processor_affinity(); >- std::vector<int> processor_affinity(); >+ std::vector<std::size_t> processor_affinity(); > > gr::hier_block2_sptr to_hier_block2(); // Needed for Python type coercion > }; >diff --git a/gr-blocks/lib/qa_gr_top_block.cc b/gr-blocks/lib/qa_gr_top_block.cc >index 39709d2..fe927af 100644 >--- a/gr-blocks/lib/qa_gr_top_block.cc >+++ b/gr-blocks/lib/qa_gr_top_block.cc >@@ -278,7 +278,7 @@ void qa_top_block::t11_set_block_affinity() > gr::block_sptr src (gr::blocks::null_source::make(sizeof(float))); > gr::block_sptr snk (gr::blocks::null_sink::make(sizeof(float))); > >- std::vector<int> set(1, 0), ret; >+ std::vector<std::size_t> set(1, 0), ret; > src->set_processor_affinity(set); > > tb->connect(src, 0, snk, 0);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1143914
:
938811
|
938813
|
938818
| 939065