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

SCM Repository

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

Diff of /branches/vis12/src/compiler/c-target/fragments/init.in

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

revision 1718, Sat Mar 10 23:03:02 2012 UTC revision 1862, Sun Apr 22 19:45:47 2012 UTC
# Line 6  Line 6 
6          return 0;          return 0;
7    
8      wrld->name          = ProgramName;      wrld->name          = ProgramName;
9      wrld->err           = 0;      wrld->errors        = biffMsgNew("DIDEROT");
10    
11        if (wrld->errors == 0) {
12            FREE (wrld);
13            return 0;
14        }
15    
16      wrld->verboseFlg    = false;      wrld->verboseFlg    = false;
17      wrld->nStrandTys    = 1;  /* FIXME */      wrld->nStrandTys    = 1;  /* FIXME */
18      wrld->strandDesc    = &Strand_@STRAND@;      wrld->strandDesc    = &Strand_@STRAND@;
19        wrld->globals       = NEW(@PREFIX@Globals_t);
20    
21        if (wrld->globals == 0) {
22            biffMsgNix (wrld->errors);
23            FREE (wrld);
24            return 0;
25        }
26    
27    #ifdef DIDEROT_TARGET_PARALLEL
28        wrld->sched         = NEW(Diderot_Sched_t);
29    
30        if ((wrld->sched == 0)
31        ||  Diderot_GetNumCPUs(&(wrld->sched->cpuInfo))
32        ||  (pthread_mutex_init (&(wrld->sched->lock), 0) != 0)
33        ||  (pthread_cond_init (&(wrld->sched->barrier), 0) != 0)
34        ||  (pthread_cond_init (&(wrld->sched->runWait), 0) != 0)) {
35            biffMsgNix (wrld->errors);
36            FREE (wrld->globals);
37            FREE (wrld->sched);
38            FREE (wrld);
39            return 0;
40        }
41        wrld->sched->numWorkers = wrld->sched->cpuInfo.numHWCores;
42    #endif
43    
44      // initialize the input defaults
45        InitDefaults (wrld);
46    
47     return wrld;     return wrld;
48    

Legend:
Removed from v.1718  
changed lines
  Added in v.1862

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