summaryrefslogtreecommitdiff
path: root/lib/gras_impl/block_actor.hpp
diff options
context:
space:
mode:
authorJosh Blum2012-10-04 22:57:08 -0700
committerJosh Blum2012-10-04 22:57:08 -0700
commit075dfb6aae5c309b34789761aee3acd63f9d03fc (patch)
tree1b4a0d0775a710f4ddc7e6c9dd207f9fe7898f16 /lib/gras_impl/block_actor.hpp
parent05e373937410cbd36bd5cacffff1cdb8ace9c671 (diff)
downloadsandhi-075dfb6aae5c309b34789761aee3acd63f9d03fc.tar.gz
sandhi-075dfb6aae5c309b34789761aee3acd63f9d03fc.tar.bz2
sandhi-075dfb6aae5c309b34789761aee3acd63f9d03fc.zip
for loop for any_inputs_done is actually lighter-weight
Diffstat (limited to 'lib/gras_impl/block_actor.hpp')
-rw-r--r--lib/gras_impl/block_actor.hpp9
1 files changed, 8 insertions, 1 deletions
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