ImageEngine/gaffer — pull request #936 by andrewkaufman (2014-07-29 22:42:05+00:00)
Title: Batched Dispatching

The bulk of this work addresses #870, and the last 2 commits address #871. The `ExecutableNode` public API has gone though a significant re-design, and any external `ExecutableNodes` will most certainly need updating to match. I've put a basic guide for updating nodes at the bottom.

`ExecutableNodes` now `execute()` using the current `Context`. Multi-context execution can be accomplished using `executeSequence( frames )` assuming the client only needs to vary the frame of the current `Context`. `requiresSequenceExecution()` can be defined by nodes with special needs (`SceneWriter` for example), to alert clients that sequence execution is more appropriate.

`Dispatcher::TaskDescriptions` have also been re-designed for batching frames, and the python bindings now provide `task()`, `frames()`, and `requirements()`, rather than just a list of un-named tuples. External `Dispatchers` will need updating for this change. `ExecutableNodes` now have a `batchSize` plug to determine the user specified frame batching. This plug is used by `Dispatcher` itself when making the unique `TaskDescription` list, so all `Dispatchers` should end up respecting the batching automatically.

How to update your `ExecutableNode`:
- `executionHash()` renamed to `hash()`
- `executionRequirements()` renamed to `requirements()`
- `virtual void execute( const Contexts &contexts ) const` changed to `virtual void execute() const` which uses `Context::current()`
- Optionally re-implement `virtual void executeSequence( const std::vector &frames ) const` and `virtual bool requiresSequenceExecution() const`. See `SceneWriter` for an example.