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/par-main.in
ViewVC logotype

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

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

revision 2534, Thu Jan 30 15:47:24 2014 UTC revision 2535, Thu Jan 30 19:22:10 2014 UTC
# Line 12  Line 12 
12      }      }
13    
14      Diderot_uint_t seqThreshold = SPATIAL_SEQ_THERSHOLD;      Diderot_uint_t seqThreshold = SPATIAL_SEQ_THERSHOLD;
15        Diderot_uint_t workgroupSize = DIDEROT_REDUCE_WORKGROUP_SIZE;
16    // handle command-line options    // handle command-line options
17      {      {
18          Diderot_Options_t *opts = Diderot_OptNew ();          Diderot_Options_t *opts = Diderot_OptNew ();
# Line 24  Line 25 
25          Diderot_OptAddFlag (opts, "text", "enable text output", &printOutputFlg);          Diderot_OptAddFlag (opts, "text", "enable text output", &printOutputFlg);
26          Diderot_OptAddUInt (opts, "np", "specify number of worker threads", &np, true);          Diderot_OptAddUInt (opts, "np", "specify number of worker threads", &np, true);
27          Diderot_OptAddUInt (opts, "seqt", "specify the strands' threshold before executing the sequential KDtree construction.", &seqThreshold, true);          Diderot_OptAddUInt (opts, "seqt", "specify the strands' threshold before executing the sequential KDtree construction.", &seqThreshold, true);
28        Diderot_OptAddUInt (opts, "wgsize", "specify the workgroup size for a worker when performing a global reduction", &workgroupSize, true);
29          RegisterGlobalOpts (&inputs, opts);          RegisterGlobalOpts (&inputs, opts);
30          Diderot_OptProcess (opts, argc, argv);          Diderot_OptProcess (opts, argc, argv);
31          Diderot_OptFree (opts);          Diderot_OptFree (opts);
32          wrld->sched->numWorkers = np;          wrld->sched->numWorkers = np;
33        wrld->globSched->numWorkers = np;
34    
35          InitInputs (wrld, &inputs);          InitInputs (wrld, &inputs);
36      }      }
# Line 42  Line 45 
45  #ifdef DIDEROT_SPATIAL_COM  #ifdef DIDEROT_SPATIAL_COM
46      wrld->spatialSched->seqThreshold = seqThreshold;      wrld->spatialSched->seqThreshold = seqThreshold;
47  #endif  #endif
48    
49    #ifdef DIDEROT_PARALLEL_REDUCTION
50        wrld->globSched->groupSize = workgroupSize;
51    #endif
52    
53    
54      if (wrld->verboseFlg)      if (wrld->verboseFlg)
55          fprintf(stderr, "run with %d strands ...\n", wrld->numStrands);          fprintf(stderr, "run with %d strands ...\n", wrld->numStrands);
56      double t0 = airTime();      double t0 = airTime();

Legend:
Removed from v.2534  
changed lines
  Added in v.2535

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