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

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.12 by gregl, Thu Nov 20 11:39:24 1997 UTC vs.
Revision 3.14 by gregl, Mon Dec 1 16:34:21 1997 UTC

# Line 9 | Line 9 | static char SCCSid[] = "$SunId$ SGI";
9   */
10  
11   #include "rholo.h"
12 + #include "random.h"
13   #include "paths.h"
14   #include <signal.h>
15   #include <sys/types.h>
# Line 61 | Line 62 | char   *argv[];
62          int     force = 0;
63                                                  /* mark start time */
64          starttime = time(NULL);
65 +        initurand(10240);                       /* initialize urand */
66          progname = argv[0];                     /* get arguments */
67          for (i = 1; i < argc && argv[i][0] == '-'; i++)
68                  switch (argv[i][1]) {
# Line 369 | Line 371 | register HDGRID        *gp;
371                  vval(OBSTRUCTIONS) = "T";
372                  vdef(OBSTRUCTIONS)++;
373          }
374 +        if (!vdef(VDIST)) {
375 +                vval(VDIST) = "F";
376 +                vdef(VDIST)++;
377 +        }
378          if (!vdef(OCCUPANCY)) {
379                  vval(OCCUPANCY) = "U";
380                  vdef(OCCUPANCY)++;
# Line 463 | Line 469 | loadholo()                     /* start loading a holodeck from fname */
469   done_packets(pl)                /* handle finished packets */
470   PACKET  *pl;
471   {
472 <        static int      nunflushed = 0;
472 >        static int      n2flush = 0;
473          register PACKET *p;
474  
475          while (pl != NULL) {
# Line 474 | Line 480 | PACKET *pl;
480                                  p->nr*sizeof(RAYVAL));
481                          if (outdev != NULL)     /* display it */
482                                  disp_packet((PACKHEAD *)p);
483 <                        else
484 <                                nunflushed += p->nr;
483 >                        if (hdcachesize <= 0)   /* manual flushing */
484 >                                n2flush += p->nr;
485                          nraysdone += p->nr;
486                          npacksdone++;
487                  }
# Line 483 | Line 489 | PACKET *pl;
489                  p->next = freepacks;
490                  freepacks = p;
491          }
492 <        if (nunflushed >= 256*RPACKSIZ) {
492 >        if (n2flush > 512*RPACKSIZ*ncprocs) {
493                  hdflush(NULL);                  /* flush holodeck buffers */
494 <                nunflushed = 0;
494 >                n2flush = 0;
495          }
496   }
497  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines