Parallel programming isn’t always just a simple matter of
writing loops that run at the same time. While that might work
for certain individual algorithms, bigger software systems are
certainly more complex and require a type of parallel
programming that goes beyond simple loops and spawning C++
threads. Instead, most systems are more likely to be along the
lines of, “Step A must precede all steps, but Steps B and C can
run in parallel.” And you might even have more complexity like,
“Step B1 follows step B, and Step C1 follows both Step B1 and
C.” Such systems can be diagrammed using a directed graph. A
directed graph is a type of graph that contains nodes with
arrows pointing between nodes. In this case, each node
represents a task to perform. Modeling such systems directly can
be difficult and result in bugs. And that’s where the graph
classes in Threading Building Blocks help. TBB includes several
classes as part of the tbb:flow namepsace, such as a basic graph
class, and a basic node class. The Importance