seanhalle@0: seanhalle@0: This test app is for VReo development.. first version replicates a program seanhalle@0: from the paper. It has two producers and one consumer. The circuit causes seanhalle@0: the producers to take turns providing the next input that the consumer takes. seanhalle@0: seanhalle@0: The circuit is in the paper.. seanhalle@0: seanhalle@0: The way the code works, the circuit is supplied separately. A function is seanhalle@0: generated by a tool, which creates the circuit data structs. Those structs seanhalle@0: contain pointers to the functions that check transitions and then perform seanhalle@0: transitions. seanhalle@0: seanhalle@0: So, the seed first starts up VReo, then it calls the create circuit Fn, seanhalle@0: which returns a pointer to the circuit, then it calls create_VP three seanhalle@0: times. The first, it hands it the pointer to the producer Fn, along with seanhalle@0: a pointer to the circuit and an integer that indicates that it connects to seanhalle@0: port 1 of the circuit. Second, it creates another producer, but connected seanhalle@0: to port 2, then it creates a consumer connected to port 3. seanhalle@0: seanhalle@0: Then, it waits for the computation to end. seanhalle@0: seanhalle@0: A producer puts out 5 items, doing a print for each. The consumer consumes seanhalle@0: 10 items, doing a print for each. seanhalle@0: seanhalle@0: Then each of them call "end_VP". seanhalle@0: seanhalle@0: That ends the computation, and the seed comes back, and calls "end_seed_VP" seanhalle@0: seanhalle@0: