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

SCM Repository

[diderot] Diff of /branches/vis12-cl/src/compiler/c-target/fragments/par-main.in
ViewVC logotype

Diff of /branches/vis12-cl/src/compiler/c-target/fragments/par-main.in

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

revision 1826, Thu Apr 12 14:04:38 2012 UTC revision 1831, Fri Apr 13 13:33:40 2012 UTC
# Line 11  Line 11 
11          exit (1);          exit (1);
12      }      }
13    
     CPUInfo_t cpuInfo;  
     if (! Diderot_GetNumCPUs (&cpuInfo)) {  
         fprintf(stderr, "unable to get number of processors\n");  
         exit (1);  
     }  
   
     Diderot_int_t np = cpuInfo.numHWCores;  
   
14    // handle command-line options    // handle command-line options
15      Diderot_Options_t *opts = Diderot_OptNew ();      Diderot_Options_t *opts = Diderot_OptNew ();
16        Diderot_uint_t np = wrld->sched->numWorkers;
17        Diderot_OptAddFlag (opts, "verbose", "enable runtime-system messages", &(wrld->verboseFlg));
18      Diderot_OptAddFlag (opts, "timing", "enable execution timing", &timingFlg);      Diderot_OptAddFlag (opts, "timing", "enable execution timing", &timingFlg);
19      Diderot_OptAddFlag (opts, "nrrd", "enable nrrd output", &printOutputFlg);      Diderot_OptAddFlag (opts, "nrrd", "enable nrrd output", &printOutputFlg);
20      Diderot_OptAddInt (opts, "np", "specify number of worker threads", &np, true);      Diderot_OptAddUInt (opts, "np", "specify number of worker threads", &np, true);
21      RegisterGlobalOpts (wrld, opts);      RegisterGlobalOpts (wrld, opts);
22      Diderot_OptProcess (opts, argc, argv);      Diderot_OptProcess (opts, argc, argv);
23      Diderot_OptFree (opts);      Diderot_OptFree (opts);
24        wrld->sched->numWorkers = np;
25    
26    // run the generated global initialization code    // run the generated global initialization code
27      if (wrld->verboseFlg)      if (wrld->verboseFlg)

Legend:
Removed from v.1826  
changed lines
  Added in v.1831

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