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

Comparing ray/src/hd/holofile.c (file contents):
Revision 3.56 by greg, Thu Sep 9 01:06:19 2004 UTC vs.
Revision 3.59 by greg, Fri Sep 3 23:52:42 2010 UTC

# Line 18 | Line 18 | static const char      RCSid[] = "$Id$";
18  
19   #ifndef CACHESIZE
20   #ifdef SMLMEM
21 < #define CACHESIZE       5
21 > #define CACHESIZE       10
22   #else
23 < #define CACHESIZE       17      /* default cache size (Mbytes, 0==inf) */
23 > #define CACHESIZE       100     /* default cache size (Mbytes, 0==inf) */
24   #endif
25   #endif
26   #ifndef FREEBEAMS
# Line 30 | Line 30 | static const char      RCSid[] = "$Id$";
30   #define PCTFREE         15      /* maximum fraction to free (%) */
31   #endif
32   #ifndef MAXFRAGB
33 < #define MAXFRAGB        16      /* fragment blocks/file to track (0==inf) */
33 > #define MAXFRAGB        64      /* fragment blocks/file to track (0==inf) */
34   #endif
35   #ifndef FF_DEFAULT
36                                  /* when to free a beam fragment */
# Line 246 | Line 246 | hdinit(        /* initialize a holodeck section in a file */
246                  }
247          if (rtrunc) {
248                  sprintf(errmsg, "truncated section, %ld rays lost (%.1f%%)",
249 <                                rtrunc, 100.*rtrunc/(rtrunc+biglob(hp)->nrd));
249 >                                (long)rtrunc,
250 >                                100.*rtrunc/(rtrunc+biglob(hp)->nrd));
251                  error(WARNING, errmsg);
252          }
253                                          /* add to holodeck list */
# Line 407 | Line 408 | hdfiluse(      /* compute file usage (in bytes) */
408   )
409   {
410          off_t   total = 0;
411 <        register int    i, j;
411 >        register int    j;
412  
413          for (j = 0; hdlist[j] != NULL; j++) {
414                  if (hdlist[j]->fd != fd)
415                          continue;
416                  total += biglob(hdlist[j])->nrd * sizeof(RAYVAL);
417 <                i = nbeams(hdlist[j]);
418 <                total += i*sizeof(BEAMI) + sizeof(HDGRID);
419 <                for ( ; i > 0; i--)
417 >                total += nbeams(hdlist[j])*sizeof(BEAMI) + sizeof(HDGRID);
418 > #if 0
419 >                for (i = nbeams(hdlist[j]); i > 0; i--)
420                          if (hdlist[j]->bl[i] != NULL)
421                                  total += sizeof(RAYVAL) *
422                                                  (hdlist[j]->bl[i]->nrm -
423                                                  hdlist[j]->bi[i].nrd);
424 + #endif
425          }
426 <        return(total);          /* does not include fragments */
426 >        return(total);          /* doesn't include fragments, unflushed rays */
427   }
428  
429  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines