From 734c3740c4ddccfbedf697edbd39021580fd51ce Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sat, 4 May 2013 20:42:09 -0700 Subject: gras: implement force done input port option fixes #28 --- lib/gras_impl/block_actor.hpp | 4 +++- 1 file changed, 3 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 5444bb0..e5dbaac 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -182,7 +182,9 @@ GRAS_FORCE_INLINE void BlockActor::update_input_avail(const size_t i) GRAS_FORCE_INLINE bool BlockActor::is_input_done(const size_t i) { - return this->inputs_done[i] and not this->inputs_available[i]; + const bool force_done = this->input_configs[i].force_done; + if GRAS_LIKELY(force_done) return this->inputs_done[i] and not this->inputs_available[i]; + return this->inputs_done.all() and this->inputs_available.none(); } GRAS_FORCE_INLINE bool BlockActor::is_work_allowed(void) -- cgit