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

SCM Repository

[diderot] Annotation of /branches/vis12/bugs/bug010.diderot
ViewVC logotype

Annotation of /branches/vis12/bugs/bug010.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2177 - (view) (download)

1 : glk 2177 // this version hits the issue of a join node with zero predecessors
2 :     // (This is a simplified version of branches/vis12/test/hlic/hlic-BUG1.diderot
3 :     // from which the comment above originates)
4 :    
5 :     //
6 :     int imgSize = 200;
7 :     real h = 0.3; // step size of integration
8 :     int stepNum = 2; // take this many steps both upstream and downstream
9 :    
10 :     strand LIC (int xi, int yi) {
11 :     real xx = lerp(0.0, 79.0, -0.5, real(xi), real(imgSize)-0.5);
12 :     real yy = lerp(0.0, 79.0, -0.5, real(yi), real(imgSize)-0.5);
13 :     vec2 pos0 = [xx,yy];
14 :     vec2 pos = pos0;
15 :     vec2 step = [0.0,0.0];
16 :     output vec3 out = [0.0,0.0,0.0];
17 :     real sum = 0.0;
18 :     int num = 0;
19 :     int mon = 0;
20 :     real dir = 1.0;
21 :    
22 :     update {
23 :     step = 0.5*h*dir*pos;
24 :     pos += step;
25 :     if (num == stepNum) {
26 :     if (dir > 0.0) {
27 :     stabilize;
28 :     // [bug010.diderot:27.11-28.0] Warning: statements following "stabilize" statment are unreachable
29 :     // [bug010.diderot:26.9-42.0] Warning: unreachable statements after "if-then-else" statement
30 :     // error in cvtMethod(Update, ...)
31 :     // uncaught exception Fail [Fail: unimplemented]
32 :     // raised at common/phase-timer.sml:76.50-76.52
33 :     // raised at translate/translate.sml:380.110-380.112
34 :     // raised at translate/translate.sml:320.29-320.31
35 :     // raised at translate/translate.sml:320.29-320.31
36 :     // raised at translate/translate.sml:293.29-293.49
37 :     //make: *** [hlic.o] Error 1
38 :     num = 0;
39 :     pos = pos0;
40 :     dir = -1.0;
41 :     } else {
42 :     stabilize;
43 :     }
44 :     }
45 :     sum += |pos|;
46 :     num += 1;
47 :     mon += 1;
48 :    
49 :     if (7 == mon) {
50 :     stabilize;
51 :     }
52 :     }
53 :    
54 :     stabilize {
55 :     out = [real(num),sum,dir];
56 :     }
57 :     }
58 :    
59 :     initially [ LIC(xi, yi) | yi in 0..(imgSize-1), xi in 0..(imgSize-1) ];

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