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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4955 - (download) (annotate)
Fri Apr 7 21:33:21 2017 UTC (2 years, 4 months ago) by jhr
File size: 378 byte(s)
tweak test program
#version 2.0

// test the "new" operation
//

input int MaxNumStrands = 8191; // should be 2^n - 1 for some n
int step = 0;

strand S (int i) {
    output int id = i;
    update {
	if (id < MaxNumStrands) {
	    new S (2*id+1);
	    new S (2*id+2);
	}
	stabilize;
    }

}

update {
  step += 1;
  print ("global update ", step, "\n");
}

create_collection { S(0) | i in 1..1 }

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