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.8 by greg, Sat Jun 16 17:09:49 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 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 338 | Line 336 | rcontrib()
336                  if (raysleft && !--raysleft)
337                          break;          /* preemptive EOI */
338          }
339 <        if (nchild != -1 && (accumulate <= 0) | (account < accumulate)) {
339 >        if ((accumulate <= 0) | (account < accumulate)) {
340                  if (account < accumulate) {
341                          error(WARNING, "partial accumulation in final record");
342                          accumulate -= account;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines