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[]; |
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); |
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--) { |