ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rcontrib.c
(Generate patch)

Comparing ray/src/rt/rcontrib.c (file contents):
Revision 2.7 by greg, Fri Jun 15 21:32:11 2012 UTC vs.
Revision 2.11 by greg, Tue Jun 19 01:27:13 2012 UTC

# Line 27 | Line 27 | int    do_irrad = 0;                   /* compute irradiance? */
27  
28   int     rand_samp = 1;                  /* pure Monte Carlo sampling? */
29  
30 < double  dstrsrc = 0.0;                  /* square source distribution */
30 > double  dstrsrc = 0.9;                  /* square source distribution */
31   double  shadthresh = .03;               /* shadow threshold */
32   double  shadcert = .75;                 /* shadow certainty */
33   int     directrelay = 3;                /* number of source relays */
# Line 137 | Line 137 | addmodifier(char *modn, char *outf, char *binv, int bi
137   }
138  
139  
140 < /* add modifiers from a file list */
140 > /* Add modifiers from a file list */
141   void
142   addmodfile(char *fname, char *outf, char *binv, int bincnt)
143   {
# Line 159 | Line 159 | quit(                  /* quit program */
159   )
160   {
161          if (nchild > 0)         /* close children if any */
162 <                end_children();
162 >                end_children(code != 0);
163          exit(code);
164   }
165  
# Line 178 | Line 178 | rcinit()
178                                          /* set shared memory boundary */
179                  shm_boundary = strcpy((char *)malloc(16), "SHM_BOUNDARY");
180          }
181        if ((nproc > 1) & (accumulate <= 0))
182                put_zero_record(0);     /* prime our queue to accumulate */
183
181          if (yres > 0) {                 /* set up flushing & ray counts */
182                  if (xres > 0)
183                          raysleft = (RNUMBER)xres*yres;
# Line 199 | Line 196 | rcinit()
196                  return;                 /* return to main processing loop */
197  
198          if (recover) {                  /* recover previous output? */
199 <                if (accumulate <= 0) {
199 >                if (accumulate <= 0)
200                          reload_output();
201 <                        if (nproc > 1)
205 <                                queue_modifiers();
206 <                } else
201 >                else
202                          recover_output();
203          }
204          if (nproc == 1)                 /* single process? */
205                  return;
206 <
207 <        parental_loop();                /* else run controller */
206 >                                        /* else run appropriate controller */
207 >        if (accumulate <= 0)
208 >                feeder_loop();
209 >        else
210 >                parental_loop();
211          quit(0);                        /* parent musn't return! */
212   }
213  
# Line 346 | Line 344 | rcontrib()
344                  account = 1;            /* output accumulated totals */
345                  done_contrib();
346          }
347 +        lu_done(&ofiletab);             /* close output files */
348          if (raysleft)
349                  error(USER, "unexpected EOF on input");
351        lu_done(&ofiletab);             /* close output files */
350   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines