From 075dfb6aae5c309b34789761aee3acd63f9d03fc Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 4 Oct 2012 22:57:08 -0700 Subject: for loop for any_inputs_done is actually lighter-weight --- lib/gras_impl/block_actor.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/gras_impl/block_actor.hpp') diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 023011d..4fe6359 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -114,7 +114,14 @@ struct BlockActor : Apology::Worker GRAS_FORCE_INLINE bool any_inputs_done(void) { if (this->inputs_done.none()) return false; - return ((~this->input_queues.ready_bitset()) & this->inputs_done).any(); + for (size_t i = 0; i < this->get_num_inputs(); i++) + { + if (this->inputs_done[i] and not this->input_queues.ready(i)) + { + return true; + } + } + return false; } //per port properties -- cgit