diff options
author | Josh Blum | 2013-05-04 20:42:09 -0700 |
---|---|---|
committer | Josh Blum | 2013-05-04 20:42:09 -0700 |
commit | 734c3740c4ddccfbedf697edbd39021580fd51ce (patch) | |
tree | bdd3d4a9d00b110397ef673692500b62a389cfe6 /lib/gras_impl | |
parent | 540a314a00b747c293f81d7931c22252a861fcdd (diff) | |
download | sandhi-734c3740c4ddccfbedf697edbd39021580fd51ce.tar.gz sandhi-734c3740c4ddccfbedf697edbd39021580fd51ce.tar.bz2 sandhi-734c3740c4ddccfbedf697edbd39021580fd51ce.zip |
gras: implement force done input port option
fixes #28
Diffstat (limited to 'lib/gras_impl')
-rw-r--r-- | lib/gras_impl/block_actor.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) |