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

SCM Repository

[diderot] Annotation of /tests/vis15-bugs/gst2b.diderot
ViewVC logotype

Annotation of /tests/vis15-bugs/gst2b.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (view) (download)

1 : glk 4640 #version 2
2 :    
3 :     /*
4 :     Compiling with vis15 r4464 the attached program generates:
5 :    
6 :     gst2b.cxx:509:36: error: use of undeclared identifier 'l_iter_10'
7 :     this->output() << "update(" << l_iter_10 << "): target = " << l_target_13 << "\n" << std::flush;
8 :     ^
9 :     1 error generated.
10 :     uncaught exception Fail [Fail: error compiling/linking]
11 :     raised at common/phase-timer.sml:78.57-78.59
12 :     raised at common/phase-timer.sml:78.57-78.59
13 :     raised at cxx-util/run-cc.sml:30.24-30.54
14 :     */
15 :     /*const*/ int N = 10;
16 :     real target = 0.0;
17 :     int iter = 0;
18 :    
19 :     strand S (int i) {
20 :     output real e = i;
21 :    
22 :     update {
23 :     real delta = (target - e)/2;
24 :     print (i, ": e = ", e, ", delta = ", delta, "\n");
25 :     if (|delta| < 0.001) {
26 :     stabilize;
27 :     } else {
28 :     e += delta;
29 :     }
30 :     }
31 :    
32 :     }
33 :    
34 :     start {
35 :     target = mean { p.e | p in S.all };
36 :     print("initially: target = ", target, "\n");
37 :     }
38 :    
39 :     update {
40 :     iter += 1;
41 :     target = sum { p.e | p in S.all } / N;
42 :     print("update(", iter, "): target = ", target, "\n");
43 :     }
44 :    
45 :     create_collection { S(i) | i in 1..N }

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