Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /tests/new-tests/test-new.diderot
ViewVC logotype

Annotation of /tests/new-tests/test-new.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4955 - (view) (download)

1 : glk 4640 #version 2.0
2 :    
3 :     // test the "new" operation
4 :     //
5 :    
6 : jhr 4955 input int MaxNumStrands = 8191; // should be 2^n - 1 for some n
7 :     int step = 0;
8 : glk 4640
9 :     strand S (int i) {
10 :     output int id = i;
11 :     update {
12 :     if (id < MaxNumStrands) {
13 : jhr 4904 new S (2*id+1);
14 :     new S (2*id+2);
15 : glk 4640 }
16 :     stabilize;
17 :     }
18 :    
19 :     }
20 :    
21 : jhr 4955 update {
22 :     step += 1;
23 :     print ("global update ", step, "\n");
24 :     }
25 :    
26 : glk 4640 create_collection { S(0) | i in 1..1 }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0