Difference between revisions of "Computation graph"

From CSE231 Wiki
Jump to navigation Jump to search
Line 2: Line 2:
  
 
Tips for drawing a computation graph from code:
 
Tips for drawing a computation graph from code:
 +
 +
<nowiki>
 +
s1;
 +
finish { // F1-Start
 +
  async s2;
 +
  finish { // F2-Start
 +
    async s3;
 +
    async s4;
 +
    s5;
 +
  } // F2-End
 +
  async s6;
 +
  s7;
 +
} // F1-End
 +
s8;</nowiki>
  
 
1) Draw out the continuation spine:
 
1) Draw out the continuation spine:

Revision as of 23:40, 20 September 2017

Computation Graph

Tips for drawing a computation graph from code:

s1;
finish { // F1-Start
  async s2;
  finish { // F2-Start
    async s3;
    async s4;
    s5;
  } // F2-End
  async s6;
  s7;
} // F1-End
 s8;

1) Draw out the continuation spine:

Cg-A-ContinuationOnly.svg

2) then fill in the rest of the nodes.

Cg-A.svg