I have a class of calculations that naturally takes the structure of a graph. The graph is far from linear, as there are several inputs, as well as nodes that fail, and nodes that require the result of several other nodes. All of these calculations may have several shells. However, cycles are never present. Input nodes are updated (not necessarily one at a time), and I have their values ββpassing through a (currently purely conceptual) graph. Nodes maintain state when inputs change, and calculations must be performed sequentially with respect to the inputs.
How should I write such calculations quite often, and I was reluctant to write ad-hoc code every time, I tried to write a small library to simplify the addition of these calculations by writing classes for different vertices. My code, however, is rather inelegant, and it does not take advantage of the parallel structure of these calculations. Although each vertex is usually lightweight, the calculations can be quite complex and "wide." To make the problem even more complex, the inputs for these calculations are very often updated in a loop. Fortunately, the problems are quite small, and I can deal with them on one node.
Has anyone dealt with something like this? What ideas / approaches / tools would you recommend?
stream dataflow control-flow-graph
em70
source share