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.6 by greg, Sat May 28 22:27:54 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",
69 > char            *rtargv[256] = { "rtrace", "-dj", ".5", "-dr", "3",
70                                  "-ab", "1", "-ad", "128", };
71 < int  rtargc = 11;
71 > int  rtargc = 9;
72                                          /* overriding rtrace options */
73 < char            *myrtopts[] = { "-o~~TmWdp", "-h-",
74 <                                "-x", "1", "-y", "0",
75 <                                "-as", "0", "-aa", "0", NULL };
73 > char            *myrtopts[] = { "-o~~TmWdp", "-h-", "-x", "1", "-y", "0",
74 >                                "-dt", "0", "-as", "0", "-aa", "0", NULL };
75  
76   struct rtproc   rt0;                    /* head of rtrace process list */
77  
78   struct rtproc   *rt_unproc = NULL;      /* unprocessed ray trees */
79  
80   char    persistfn[] = "pfXXXXXX";       /* persist file name */
82 char    fmt[8];                         /* rtrace i/o format */
81  
82   int             gargc;                  /* global argc */
83   char            **gargv;                /* global argv */
# Line 107 | Line 105 | int            nmods = 0;              /* number of modifiers */
105  
106   MODCONT *addmodifier(char *modn, char *outf, char *binv);
107  
110 int done_rprocs(struct rtproc *rtp);
108   void init(int np);
109 < void tracecontribs(FILE *fp);
109 > int done_rprocs(struct rtproc *rtp);
110 > void trace_contribs(FILE *fp);
111   struct rtproc *wait_rproc(void);
112   struct rtproc *get_rproc(void);
113   void queue_raytree(struct rtproc *rtp);
# Line 159 | Line 157 | main(int argc, char *argv[])
157          int     nprocs = 1;
158          char    *curout = NULL;
159          char    *binval = NULL;
160 +        char    fmt[8];
161          int     i, j;
162                                  /* global program name */
163          gargv = argv;
# Line 269 | Line 268 | main(int argc, char *argv[])
268                  execv(rtpath, rtargv);
269                  perror(rtpath); /* execv() should not return */
270                  exit(1);
271 <        } else if (nprocs > 1) {        /* add persist file if parallel */
271 >        }
272 >        if (nprocs > 1) {       /* add persist file if parallel */
273                  rtargv[rtargc++] = "-PP";
274                  rtargv[rtargc++] = mktemp(persistfn);
275          }
# Line 283 | Line 283 | main(int argc, char *argv[])
283          rtargv[rtargc] = NULL;
284                                  /* start rtrace & compute contributions */
285          init(nprocs);
286 <        tracecontribs(stdin);
286 >        trace_contribs(stdin);
287          quit(0);
288   }
289  
# Line 335 | Line 335 | quit(int status)
335          exit(status);                   /* flushes all output streams */
336   }
337  
338 < /* start rtrace and initialize buffers */
338 > /* start rtrace processes and initialize */
339   void
340   init(int np)
341   {
# Line 842 | Line 842 | get_rproc(void)
842  
843   /* trace ray contributions (main loop) */
844   void
845 < tracecontribs(FILE *fin)
845 > trace_contribs(FILE *fin)
846   {
847          char            inpbuf[128];
848          int             iblen;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines