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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/lib/parallel-target/main.c
ViewVC logotype

Diff of /branches/pure-cfg/src/lib/parallel-target/main.c

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

revision 1461, Mon Aug 8 04:50:12 2011 UTC revision 1462, Tue Aug 9 07:22:45 2011 UTC
# Line 181  Line 181 
181    
182  int main (int argc, const char **argv)  int main (int argc, const char **argv)
183  {  {
184    
185    
186      CPUInfo_t cpuInfo;      CPUInfo_t cpuInfo;
187      if (! GetNumCPUs (&cpuInfo)) {      if (! GetNumCPUs (&cpuInfo)) {
188          fprintf(stderr, "unable to get number of processors\n");          fprintf(stderr, "unable to get number of processors\n");
# Line 202  Line 204 
204      if (VerboseFlg) fprintf (stderr, "initializing globals ...\n");      if (VerboseFlg) fprintf (stderr, "initializing globals ...\n");
205      Diderot_InitGlobals ();      Diderot_InitGlobals ();
206    
207    
208    
209      if (VerboseFlg) fprintf (stderr, "initializing strands ...\n");      if (VerboseFlg) fprintf (stderr, "initializing strands ...\n");
210      Diderot_World_t *wrld = Diderot_Initially ();      Diderot_World_t *wrld = Diderot_Initially ();
211    
212    
213    
214      for (int i = 0;  i < wrld->numStrands;  i++) {      for (int i = 0;  i < wrld->numStrands;  i++) {
215        // hack to make the invariant part of the state the same in both copies        // hack to make the invariant part of the state the same in both copies
216          memcpy (wrld->outState[i], wrld->inState[i], Diderot_Strands[0]->stateSzb);          memcpy (wrld->outState[i], wrld->inState[i], Diderot_Strands[0]->stateSzb);
217      }      }
218    
219    
220    
221    // Start worker threads    // Start worker threads
222      int nWorkers = np;      int nWorkers = np;
223      WorkerArg_t *args = (WorkerArg_t *) malloc (nWorkers * sizeof(WorkerArg_t));      WorkerArg_t *args = (WorkerArg_t *) malloc (nWorkers * sizeof(WorkerArg_t));

Legend:
Removed from v.1461  
changed lines
  Added in v.1462

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