2D-Mesh Application
A 2D mesh of forward
processes is generated as the center part of the network. Two sets of producers, i.e., horizontal_generator
and vertical_generator
, generate the input of the mesh. Two sets of consumers, i.e., horizontal_consumer
and vertical_consumer
, get the output from the mesh.
The task graph consists of a 3x3
mesh of forward
processes in the center. Each forward
process has four ports, which connect to its horizontal and vertical neighbors. This set of processes is generated using iterators in two dimensions, thus the generated processes share the same C source file. In this application, all the forward
processes get data from horizontal and vertical inputs and directly pass them to the outputs.
One-dimensional iterators are used to generate two sets of generators and two sets of consumers. In this application, the horizontal generators will put one character of the string "nopqrstuvwxyz" to the mesh at each invocation, and the vertical generators will input the string "abcdefghijklm" to the mesh in the same manner. The two sets of consumers receive the corresponding outputs and display them to standard output.