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

Comparing ray/src/rt/rv3.c (file contents):
Revision 2.29 by greg, Tue Sep 16 18:35:56 2008 UTC vs.
Revision 2.30 by greg, Tue Sep 16 21:14:11 2008 UTC

# Line 242 | Line 242 | waitrays(void)                                 /* finish up pending rays */
242          int     rval;
243          RAY     raydone;
244  
245 <        if (nproc == 1)                         /* immediate mode? */
245 >        if (nproc <= 1)                         /* immediate mode? */
246                  return(0);
247          while ((rval = ray_presult(&raydone, 0)) > 0) {
248                  PNODE  *p = (PNODE *)raydone.rno;
# Line 265 | Line 265 | newimage(                                      /* start a new image */
265          extern int      ray_pnprocs;
266          int             newnp;
267                                                  /* change in nproc? */
268 <        if (s != NULL && sscanf(s, "%d", &newnp) == 1 && newnp > 0) {
268 >        if (s != NULL && sscanf(s, "%d", &newnp) == 1 &&
269 >                        (newnp > 0) & (newnp != nproc)) {
270                  if (!newparam) {
270                        if (nproc == 1)
271                                nproc = 0;      /* actually running */
271                          if (newnp == 1)
272                                  ray_pclose(0);
273 <                        else if (newnp < nproc)
274 <                                ray_pclose(nproc - newnp);
273 >                        else if (newnp < ray_pnprocs)
274 >                                ray_pclose(ray_pnprocs - newnp);
275                          else
276 <                                ray_popen(newnp - nproc);
276 >                                ray_popen(newnp - ray_pnprocs);
277                  }
278                  nproc = newnp;
279          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines