|
| 1 | + |
| 2 | +type StringListData = uint64 tupleNum, list<rstring> potterList, list<rstring> lotrList,list<rstring> austenList; |
| 3 | +type ThreeClauseString = rstring hero,rstring heroine,rstring villain; |
| 4 | +type IntData = int64 x, int64 y, int64 z; |
| 5 | + |
| 6 | +composite GenerateStringList(output OutStream) { |
| 7 | + param |
| 8 | + expression<list<rstring>> $nameList: ["Harry","Herminone","Ron","Mrs. Weasley","Sirius","Dumbledore","Lilly","Voldemort","James","Malfoy"]; |
| 9 | + expression<list<rstring>> $nameList2: ["Aragorn","Frodo","Gandalf","Eowyn","Merry","Fatty","Pippin","Eomer","Theoden","Faramir","Boromir"]; |
| 10 | + expression<int32> $iterations: (int32)getSubmissionTimeValue("iterations","100000000"); |
| 11 | + graph |
| 12 | + stream<StringListData> OutStream = Beacon() { |
| 13 | + param iterations: $iterations; |
| 14 | + output OutStream: |
| 15 | + tupleNum=IterationCount(), |
| 16 | + potterList = $nameList, |
| 17 | + lotrList = $nameList2, |
| 18 | + austenList = ["Emma","Lizzy","Jane","Wentworth","Elinor","Fanny","Anne","Lady Susan","Catherine","Henry"]; |
| 19 | + } |
| 20 | +} |
| 21 | + |
| 22 | +composite GenerateIntData(output Data) { |
| 23 | + param |
| 24 | + expression<int32> $iterations: (int32)getSubmissionTimeValue("iterations","100000000"); |
| 25 | + graph |
| 26 | + stream<int64 x,int64 y, int64 z> Data = Beacon() { |
| 27 | + param iterations: $iterations; |
| 28 | + output Data: |
| 29 | + x = (int64)IterationCount()%10l, |
| 30 | + y = (int64)IterationCount()%11l, |
| 31 | + z = (int64)IterationCount()%13l; |
| 32 | + } |
| 33 | +} |
| 34 | + |
| 35 | +composite GenerateStringData(output Data) { |
| 36 | + param |
| 37 | + expression<list<rstring>> $villains: ["Miss Bingley","Voldemort"]; |
| 38 | + expression<int32> $iterations: (int32)getSubmissionTimeValue("iterations","100000000"); |
| 39 | + graph |
| 40 | + stream<ThreeClauseString> Data = Beacon() { |
| 41 | + param iterations: $iterations; |
| 42 | + output Data: |
| 43 | + hero = "Darcy", |
| 44 | + heroine = "Lizzy", |
| 45 | + villain = $villains[(int32)(IterationCount()%2ul)]; |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | + |
0 commit comments