diff options
author | Josh Blum | 2013-06-05 22:26:26 -0700 |
---|---|---|
committer | Josh Blum | 2013-06-05 22:26:26 -0700 |
commit | 43c7ef3e7807ad3035a2882d237b0441e6102817 (patch) | |
tree | e7d559f27cf3329d3c1b7e008b2cb422bd72eda9 /lib/tag_handlers.hpp | |
parent | 58a54c2cc19113d7644b80ec032b89fa1c38a54a (diff) | |
download | sandhi-43c7ef3e7807ad3035a2882d237b0441e6102817.tar.gz sandhi-43c7ef3e7807ad3035a2882d237b0441e6102817.tar.bz2 sandhi-43c7ef3e7807ad3035a2882d237b0441e6102817.zip |
gras: compiles now with separate data struct
Diffstat (limited to 'lib/tag_handlers.hpp')
-rw-r--r-- | lib/tag_handlers.hpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/tag_handlers.hpp b/lib/tag_handlers.hpp index 8d504dd..cc03a9b 100644 --- a/lib/tag_handlers.hpp +++ b/lib/tag_handlers.hpp @@ -11,10 +11,10 @@ namespace gras GRAS_FORCE_INLINE void BlockActor::sort_tags(const size_t i) { - if GRAS_LIKELY(not this->input_tags_changed[i]) return; - std::vector<Tag> &tags_i = this->input_tags[i]; + if GRAS_LIKELY(not data->input_tags_changed[i]) return; + std::vector<Tag> &tags_i = data->input_tags[i]; std::sort(tags_i.begin(), tags_i.end()); - this->input_tags_changed[i] = false; + data->input_tags_changed[i] = false; } GRAS_FORCE_INLINE void BlockActor::trim_tags(const size_t i) @@ -24,8 +24,8 @@ GRAS_FORCE_INLINE void BlockActor::trim_tags(const size_t i) //-- and post trimmed tags to the downstream based on policy //------------------------------------------------------------------ - std::vector<Tag> &tags_i = this->input_tags[i]; - const item_index_t items_consumed_i = this->stats.items_consumed[i]; + std::vector<Tag> &tags_i = data->input_tags[i]; + const item_index_t items_consumed_i = data->stats.items_consumed[i]; size_t last = 0; while (last < tags_i.size() and tags_i[last].offset < items_consumed_i) { @@ -35,19 +35,19 @@ GRAS_FORCE_INLINE void BlockActor::trim_tags(const size_t i) if GRAS_LIKELY(last == 0) return; //call the overloaded propagate_tags to do the dirty work - this->block_ptr->propagate_tags(i, TagIter(tags_i.begin(), tags_i.begin()+last)); + block_ptr->propagate_tags(i, TagIter(tags_i.begin(), tags_i.begin()+last)); //now its safe to perform the erasure tags_i.erase(tags_i.begin(), tags_i.begin()+last); - this->stats.tags_consumed[i] += last; + data->stats.tags_consumed[i] += last; } GRAS_FORCE_INLINE void BlockActor::trim_msgs(const size_t i) { - const size_t num_read = this->num_input_msgs_read[i]; + const size_t num_read = data->num_input_msgs_read[i]; if GRAS_UNLIKELY(num_read > 0) { - std::vector<PMCC> &input_msgs = this->input_msgs[i]; + std::vector<PMCC> &input_msgs = data->input_msgs[i]; input_msgs.erase(input_msgs.begin(), input_msgs.begin()+num_read); } } |