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

SCM Repository

[diderot] View of /tests/vis15-bugs/gst2c.diderot
ViewVC logotype

View of /tests/vis15-bugs/gst2c.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 11 months ago) by glk
File size: 743 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
#version 2

/*
Compiling the attached program with vis15 r4464, it seems at the "iter += 1;" in the global update is not getting executed.
The per-strand print statements show that iter is stuck at 0.
*/
/*const*/ int N = 10;
real target = 0.0;
int iter = 0;

strand S (int i) {
  output real e = i;

  update {
    real delta = (target - e)/2 + iter;
    print (i, "(", iter, "): e = ", e, ", delta = ", delta, "\n");
    if (|delta| < 0.001) {
	stabilize;
    } else {
	e += delta;
    }
  }

}

start {
  target = mean { p.e | p in S.all };
  print("initially: target = ", target, "\n");
}

update {
  iter += 1;
  target = sum { p.e | p in S.all } / N;
  print("update: target = ", target, "\n");
}

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

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