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

Comparing ray/src/hd/rhinfo.c (file contents):
Revision 3.1 by gwlarson, Thu Dec 31 16:25:26 1998 UTC vs.
Revision 3.3 by gwlarson, Wed Jan 20 15:16:35 1999 UTC

# Line 16 | Line 16 | static char SCCSid[] = "$SunId$ SGI";
16  
17   char    *progname;              /* global argv[0] */
18  
19 + long    beamtot, samptot;       /* total beams and samples */
20  
21 +
22   main(argc, argv)
23   int     argc;
24   char    *argv[];
# Line 60 | Line 62 | FILE   *fout;
62          for (n = 0; nextloc > 0L; n++) {        /* get the section(s) */
63                  lseek(fd, (long)nextloc, 0);
64                  read(fd, (char *)&nextloc, sizeof(nextloc));
65 +                fprintf(fout, "Section %d:\n", n);
66                  hdsect = hdinit(fd, NULL);      /* load section directory */
64                fprintf(fout,"Section %d:\n",n);
67                  psectstats(hdsect, fout);       /* print section statistics */
68          }
69          nextloc = hdfilen(fd);                  /* print global statistics */
70 +        fputs("=====================================================\n", fout);
71 +        fprintf(fout, "Total samples/beams: %ld/%ld (%.2f samples/beam)\n",
72 +                        samptot, beamtot, (double)samptot/beamtot);
73          fprintf(fout, "%.1f Mbyte file, %.1f%% fragmentation\n",
74                          nextloc/(1024.*1024.),
75                          100.*(nextloc-hdfiluse(fd,1))/nextloc);
# Line 88 | Line 93 | FILE   *fp;
93  
94          fprintf(fp, "\tGrid resolution:         %d x %d x %d\n",
95                          hp->grid[0], hp->grid[1], hp->grid[2]);
96 <        fprintf(fp, "\tNumber of beams:         %d\n", nbeams(hp));
97 <        fprintf(fp, "\tNumber of ray samples:   %d\n", biglob(hp)->nrd);
96 >        fprintf(fp, "\tNumber of beams:         %ld\n", (long)nbeams(hp));
97 >        beamtot += nbeams(hp);
98 >        fprintf(fp, "\tNumber of ray samples:   %ld\n", (long)biglob(hp)->nrd);
99 >        samptot += biglob(hp)->nrd;
100          if (biglob(hp)->nrd <= 0)
101                  return;                         /* no samples to stat! */
102          for (i = nbeams(hp); i > 0; i--) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines