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

Comparing ray/src/util/rtcontrib.c (file contents):
Revision 1.4 by greg, Thu May 26 17:53:28 2005 UTC vs.
Revision 1.5 by greg, Thu May 26 21:35:35 2005 UTC

# Line 63 | Line 63 | struct rtproc {
63          int             bsiz;           /* ray tree buffer length */
64          char            *buf;           /* ray tree buffer */
65          int             nbr;            /* number of bytes from rtrace */
66 < };                              /* rtrace process */
66 > };                              /* rtrace process buffer */
67  
68                                          /* rtrace command and defaults */
69   char            *rtargv[256] = { "rtrace", "-dt", "0", "-dj", ".5", "-dr", "3",
# Line 79 | Line 79 | struct rtproc  rt0;                    /* head of rtrace process list */
79   struct rtproc   *rt_unproc = NULL;      /* unprocessed ray trees */
80  
81   char    persistfn[] = "pfXXXXXX";       /* persist file name */
82 char    fmt[8];                         /* rtrace i/o format */
82  
83   int             gargc;                  /* global argc */
84   char            **gargv;                /* global argv */
# Line 107 | Line 106 | int            nmods = 0;              /* number of modifiers */
106  
107   MODCONT *addmodifier(char *modn, char *outf, char *binv);
108  
110 int done_rprocs(struct rtproc *rtp);
109   void init(int np);
110 < void tracecontribs(FILE *fp);
110 > int done_rprocs(struct rtproc *rtp);
111 > void trace_contribs(FILE *fp);
112   struct rtproc *wait_rproc(void);
113   struct rtproc *get_rproc(void);
114   void queue_raytree(struct rtproc *rtp);
# Line 159 | Line 158 | main(int argc, char *argv[])
158          int     nprocs = 1;
159          char    *curout = NULL;
160          char    *binval = NULL;
161 +        char    fmt[8];
162          int     i, j;
163                                  /* global program name */
164          gargv = argv;
# Line 269 | Line 269 | main(int argc, char *argv[])
269                  execv(rtpath, rtargv);
270                  perror(rtpath); /* execv() should not return */
271                  exit(1);
272 <        } else if (nprocs > 1) {        /* add persist file if parallel */
272 >        }
273 >        if (nprocs > 1) {       /* add persist file if parallel */
274                  rtargv[rtargc++] = "-PP";
275                  rtargv[rtargc++] = mktemp(persistfn);
276          }
# Line 283 | Line 284 | main(int argc, char *argv[])
284          rtargv[rtargc] = NULL;
285                                  /* start rtrace & compute contributions */
286          init(nprocs);
287 <        tracecontribs(stdin);
287 >        trace_contribs(stdin);
288          quit(0);
289   }
290  
# Line 335 | Line 336 | quit(int status)
336          exit(status);                   /* flushes all output streams */
337   }
338  
339 < /* start rtrace and initialize buffers */
339 > /* start rtrace processes and initialize */
340   void
341   init(int np)
342   {
# Line 842 | Line 843 | get_rproc(void)
843  
844   /* trace ray contributions (main loop) */
845   void
846 < tracecontribs(FILE *fin)
846 > trace_contribs(FILE *fin)
847   {
848          char            inpbuf[128];
849          int             iblen;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines