Mercurial > repos > rhope
comparison testnworker.rhope @ 99:e09c2d1d6d5b
Got dataflow graph code working in compiler (nworker_c.rhope)
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 06 Aug 2010 01:42:37 -0400 |
parents | a34a982ecd32 |
children | c6ba9fe45910 |
comparison
equal
deleted
inserted
replaced
98:a34a982ecd32 | 99:e09c2d1d6d5b |
---|---|
1 Import nworker_c.rhope | 1 Import nworker_c.rhope |
2 | 2 |
3 Test NWorker[:out] | 3 Test NWorker[:out] |
4 { | 4 { |
5 ref+ <- Worker Ref["+","rhope",2,1] | 5 ref+ <- Worker Ref["+","rhope",2,1,Yes] |
6 ref* <- Worker Ref["*","rhope",2,1] | 6 ref* <- Worker Ref["*","rhope",2,1,Yes] |
7 ,a <- [NWorker["rhope"] | 7 ,a <- [NWorker["rhope"] |
8 ]Add Input["a", 0] { | 8 ]Add Input["a", 0] { |
9 ,b <- [~]Add Input["b", 1] { | 9 ,b <- [~]Add Input["b", 1] { |
10 ,c <- [~]Add Input["c", 2] { | 10 ,c <- [~]Add Input["c", 2] { |
11 ,outref <- [~]Add Output["out", 0] { | 11 ,outref <- [~]Add Output["out", 0] { |
20 } | 20 } |
21 | 21 |
22 Main[] | 22 Main[] |
23 { | 23 { |
24 Print[ | 24 Print[ |
25 [[[[NProgram]Register Builtins | 25 [[[[NProgram[]]Register Builtins |
26 ]Bind Worker["Test", Test NWorker[]] | 26 ]Bind Worker["Test", Test NWorker[]] |
27 ]Compile Program[C Program[]] | 27 ]Compile Program[C Program[]] |
28 ]Text | 28 ]Text |
29 ] | 29 ] |
30 } | 30 } |