diff options
author | Tom Rondeau | 2010-11-28 19:16:02 -0500 |
---|---|---|
committer | Tom Rondeau | 2010-11-28 19:16:02 -0500 |
commit | 26a6c76d7bfcf744a41760fb3ed1be71b1a2f338 (patch) | |
tree | 67133f00178959116b9d2c507302c6ea42b5a414 /gnuradio-core/src/lib | |
parent | 4649aa471222351e8586b90e98bb947325d340b6 (diff) | |
parent | 181ad4cda3879a1760d61054ff32f8abbc9c24cf (diff) | |
download | gnuradio-26a6c76d7bfcf744a41760fb3ed1be71b1a2f338.tar.gz gnuradio-26a6c76d7bfcf744a41760fb3ed1be71b1a2f338.tar.bz2 gnuradio-26a6c76d7bfcf744a41760fb3ed1be71b1a2f338.zip |
Merge branch 'tagging' of github.com:trondeau/gnuradio into tagging
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_block_executor.cc | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.cc b/gnuradio-core/src/lib/runtime/gr_block_executor.cc index 4a35e25d5..9c30b1334 100644 --- a/gnuradio-core/src/lib/runtime/gr_block_executor.cc +++ b/gnuradio-core/src/lib/runtime/gr_block_executor.cc @@ -110,15 +110,23 @@ propagate_tags(gr_block::tag_propagation_policy_t policy, gr_block_detail *d, d->nitems_read(i)); std::vector<pmt::pmt_t>::iterator t; - for(t = rtags.begin(); t != rtags.end(); t++) { - uint64_t newcount = pmt::pmt_to_uint64(pmt::pmt_tuple_ref(*t, 0)); - pmt::pmt_t newtup = pmt::mp(pmt::pmt_from_uint64(newcount * rrate), - pmt::pmt_tuple_ref(*t, 1), - pmt::pmt_tuple_ref(*t, 2), - pmt::pmt_tuple_ref(*t, 3)); - - for(int o = 0; o < d->noutputs(); o++) - d->output(o)->add_item_tag(newtup); + if(rrate != 1.0) { + for(t = rtags.begin(); t != rtags.end(); t++) { + uint64_t newcount = pmt::pmt_to_uint64(pmt::pmt_tuple_ref(*t, 0)); + pmt::pmt_t newtup = pmt::mp(pmt::pmt_from_uint64(newcount * rrate), + pmt::pmt_tuple_ref(*t, 1), + pmt::pmt_tuple_ref(*t, 2), + pmt::pmt_tuple_ref(*t, 3)); + + for(int o = 0; o < d->noutputs(); o++) + d->output(o)->add_item_tag(newtup); + } + } + else { + for(t = rtags.begin(); t != rtags.end(); t++) { + for(int o = 0; o < d->noutputs(); o++) + d->output(o)->add_item_tag(*t); + } } } break; |