[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 09/22: runtime: speed up all the things
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 09/22: runtime: speed up all the things |
Date: |
Wed, 24 Sep 2014 22:07:38 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit db177a6a8d11d958a6b883c30e4c649853f01e57
Author: Tim O'Shea <address@hidden>
Date: Fri Sep 19 12:48:50 2014 -0400
runtime: speed up all the things
---
gnuradio-runtime/include/gnuradio/buffer.h | 2 ++
gnuradio-runtime/lib/buffer.cc | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/gnuradio-runtime/include/gnuradio/buffer.h
b/gnuradio-runtime/include/gnuradio/buffer.h
index 305e778..c0c9f3d 100644
--- a/gnuradio-runtime/include/gnuradio/buffer.h
+++ b/gnuradio-runtime/include/gnuradio/buffer.h
@@ -127,6 +127,8 @@ namespace gr {
std::multimap<uint64_t,tag_t>::iterator get_tags_begin() { return
d_item_tags.begin(); }
std::multimap<uint64_t,tag_t>::iterator get_tags_end() { return
d_item_tags.end(); }
+ std::multimap<uint64_t,tag_t>::iterator get_tags_lower_bound(uint64_t x) {
return d_item_tags.lower_bound(x); }
+ std::multimap<uint64_t,tag_t>::iterator get_tags_upper_bound(uint64_t x) {
return d_item_tags.upper_bound(x); }
//
-------------------------------------------------------------------------
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc
index 5ab8694..f2168f4 100644
--- a/gnuradio-runtime/lib/buffer.cc
+++ b/gnuradio-runtime/lib/buffer.cc
@@ -232,8 +232,7 @@ namespace gr {
buffer::remove_item_tag(const tag_t &tag, long id)
{
gr::thread::scoped_lock guard(*mutex());
-// TODO: we can probably do this more efficiently now ...
- for(std::multimap<uint64_t,tag_t>::iterator it = d_item_tags.begin(); it
!= d_item_tags.end(); ++it) {
+ for(std::multimap<uint64_t,tag_t>::iterator it =
d_item_tags.lower_bound(tag.offset); it != d_item_tags.upper_bound(tag.offset);
++it) {
if((*it).second == tag) {
(*it).second.marked_deleted.push_back(id);
}
@@ -326,10 +325,11 @@ namespace gr {
gr::thread::scoped_lock guard(*mutex());
v.resize(0);
- std::multimap<uint64_t,tag_t>::iterator itr = d_buffer->get_tags_begin();
+ std::multimap<uint64_t,tag_t>::iterator itr =
d_buffer->get_tags_lower_bound(abs_start);
+ std::multimap<uint64_t,tag_t>::iterator itr_end =
d_buffer->get_tags_upper_bound(abs_end);
uint64_t item_time;
- while(itr != d_buffer->get_tags_end()) {
+ while(itr != itr_end) {
item_time = (*itr).second.offset + d_attr_delay;
//item_time = (*itr).offset + d_attr_delay;
- [Commit-gnuradio] [gnuradio] 05/22: blocks: Added callback to vector source GRC bindings, (continued)
- [Commit-gnuradio] [gnuradio] 05/22: blocks: Added callback to vector source GRC bindings, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 07/22: Fix(?) prune_tags: needs verification, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 15/22: digital: clock recovery fix relative limit, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 21/22: Merge branch 'master' of git.gnuradio.org:gnuradio, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 13/22: fec: turning off some debug output., git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 10/22: Formatting fix-ups, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 19/22: digital: applying same fix of the complex M&M clock recovery block as the float version., git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 14/22: blocks: deinterleaver will process more than one block at a time for significant speed improvements., git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 06/22: tags_wip, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 22/22: Merge branch 'maint', git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 09/22: runtime: speed up all the things,
git <=
- [Commit-gnuradio] [gnuradio] 12/22: docs: fixed path stripping for binary dirs in doxygen manual., git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 17/22: digital: clock recovery more verbose documentation, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 11/22: blocks: added example of how to construct and add a tag to a vector_source., git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 18/22: digital: adapt clock recovery QA, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 16/22: digital: clock recovery delete unused variables, git, 2014/09/24
- [Commit-gnuradio] [gnuradio] 20/22: CID 1240027: runtime: clean up tag pruning using iter range, git, 2014/09/24