diff options
author | Josh Blum | 2013-06-06 13:45:50 -0700 |
---|---|---|
committer | Josh Blum | 2013-06-06 13:45:50 -0700 |
commit | b7c8f27d47ca78d2b07e7a4cb53d1c8df6eb32d6 (patch) | |
tree | 6ce12ebd668d120823c652f8b09d055a149d70dc /lib/block_message.cpp | |
parent | 7889847eed1e8bc003b88b0d6ad4f7904873d2ac (diff) | |
parent | 7350e18b8d5090349390f54b76a0e251b66ce619 (diff) | |
download | sandhi-b7c8f27d47ca78d2b07e7a4cb53d1c8df6eb32d6.tar.gz sandhi-b7c8f27d47ca78d2b07e7a4cb53d1c8df6eb32d6.tar.bz2 sandhi-b7c8f27d47ca78d2b07e7a4cb53d1c8df6eb32d6.zip |
Merge branch 'actor_migration'
Diffstat (limited to 'lib/block_message.cpp')
-rw-r--r-- | lib/block_message.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/block_message.cpp b/lib/block_message.cpp index ef7dda6..08a3784 100644 --- a/lib/block_message.cpp +++ b/lib/block_message.cpp @@ -8,35 +8,35 @@ using namespace gras; void Block::post_output_tag(const size_t which_output, const Tag &tag) { - (*this)->block->stats.tags_produced[which_output]++; - (*this)->block->post_downstream(which_output, InputTagMessage(tag)); + (*this)->block_data->stats.tags_produced[which_output]++; + (*this)->worker->post_downstream(which_output, InputTagMessage(tag)); } void Block::_post_output_msg(const size_t which_output, const PMCC &msg) { - (*this)->block->stats.msgs_produced[which_output]++; - (*this)->block->post_downstream(which_output, InputMsgMessage(msg)); + (*this)->block_data->stats.msgs_produced[which_output]++; + (*this)->worker->post_downstream(which_output, InputMsgMessage(msg)); } TagIter Block::get_input_tags(const size_t which_input) { - const std::vector<Tag> &input_tags = (*this)->block->input_tags[which_input]; + const std::vector<Tag> &input_tags = (*this)->block_data->input_tags[which_input]; return TagIter(input_tags.begin(), input_tags.end()); } PMCC Block::pop_input_msg(const size_t which_input) { - std::vector<PMCC> &input_msgs = (*this)->block->input_msgs[which_input]; - size_t &num_read = (*this)->block->num_input_msgs_read[which_input]; + std::vector<PMCC> &input_msgs = (*this)->block_data->input_msgs[which_input]; + size_t &num_read = (*this)->block_data->num_input_msgs_read[which_input]; if (num_read >= input_msgs.size()) return PMCC(); PMCC p = input_msgs[num_read++]; - (*this)->block->stats.msgs_consumed[which_input]++; + (*this)->block_data->stats.msgs_consumed[which_input]++; return p; } void Block::propagate_tags(const size_t i, const TagIter &iter) { - const size_t num_outputs = (*this)->block->get_num_outputs(); + const size_t num_outputs = (*this)->worker->get_num_outputs(); for (size_t o = 0; o < num_outputs; o++) { BOOST_FOREACH(gras::Tag t, iter) @@ -52,7 +52,7 @@ void Block::post_input_tag(const size_t which_input, const Tag &tag) { InputTagMessage message(tag); message.index = which_input; - Theron::Actor &actor = *((*this)->block); + Theron::Actor &actor = *((*this)->block_actor); actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress()); } @@ -60,7 +60,7 @@ void Block::_post_input_msg(const size_t which_input, const PMCC &msg) { InputMsgMessage message(msg); message.index = which_input; - Theron::Actor &actor = *((*this)->block); + Theron::Actor &actor = *((*this)->block_actor); actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress()); } @@ -69,6 +69,6 @@ void Block::post_input_buffer(const size_t which_input, const SBuffer &buffer) InputBufferMessage message; message.index = which_input; message.buffer = buffer; - Theron::Actor &actor = *((*this)->block); + Theron::Actor &actor = *((*this)->block_actor); actor.GetFramework().Send(message, Theron::Address::Null(), actor.GetAddress()); } |