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

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/c-target/fragments/seq-run.in
ViewVC logotype

Diff of /branches/lamont/src/compiler/c-target/fragments/seq-run.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2191, Sun Feb 24 06:12:43 2013 UTC revision 2210, Tue Feb 26 05:42:16 2013 UTC
# Line 16  Line 16 
16      uint32_t nSteps = 0, nUpdates = 0;      uint32_t nSteps = 0, nUpdates = 0;
17      uint32_t nActive = wrld->numActive;      uint32_t nActive = wrld->numActive;
18    
     /** Run the Initial Global Reduction Phase */  
     @GLOBAL_REDUCE@  
19      while ((nActive > 0) && (nSteps < maxNSteps)) {      while ((nActive > 0) && (nSteps < maxNSteps)) {
20          nSteps++;          nSteps++;
21        // update strands        // update strands
# Line 26  Line 24 
24              if (! wrld->status[i]) {              if (! wrld->status[i]) {
25                  nUpdates++;                  nUpdates++;
26  //              StrandStatus_t sts = strand->update(glob, wrld->inState[i], wrld->outState[i]);  //              StrandStatus_t sts = strand->update(glob, wrld->inState[i], wrld->outState[i]);
27                  StrandStatus_t sts = @STRAND@_Update(glob, wrld->inState[i], wrld->outState[i] @PASS_GRID@);                  StrandStatus_t sts = @STRAND@_Update(glob, wrld->inState[i], wrld->outState[i],
28                                                         wrld->inState,wrld->outState,
29                                                         wrld->status, &wrld->poolInfo @PASS_GRID@);
30                  switch (sts) {                  switch (sts) {
31                    case DIDEROT_STABILIZE:                    case DIDEROT_STABILIZE:
32                      existsStabilizing = true;                      existsStabilizing = true;
# Line 41  Line 41 
41                  }                  }
42              }              }
43          }          }
44            //Increase the number of active strands if new strands were created
45            if(wrld->poolInfo.nNewStrand > 0) {
46                nActive += wrld->poolInfo.nNewStrand;
47                wrld->numActive += wrld->poolInfo.nNewStrand;
48                wrld->numStrands += wrld->poolInfo.nNewStrand;
49                wrld->poolInfo.nNewStrand = 0;
50    
51            }
52    
53    
54          @BUILD_GRID@          @BUILD_GRID@
55          if (existsStabilizing) {          if (existsStabilizing) {
56              for (int i = 0;  i < wrld->numStrands;  i++) {              for (int i = 0;  i < wrld->numStrands;  i++) {
# Line 61  Line 71 
71          @STRANDTY@ **tmp = wrld->inState;          @STRANDTY@ **tmp = wrld->inState;
72          wrld->inState = wrld->outState;          wrld->inState = wrld->outState;
73          wrld->outState = tmp;          wrld->outState = tmp;
74        /** Run the Global Reduction Phase */        /** Run the Global Block Phase */
75        @GLOBAL_REDUCE@        @GLOBAL_REDUCE@
76    
77      }      }

Legend:
Removed from v.2191  
changed lines
  Added in v.2210

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