ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rcontrib.h
(Generate patch)

Comparing ray/src/rt/rcontrib.h (file contents):
Revision 2.5 by greg, Sat Jun 16 17:09:49 2012 UTC vs.
Revision 2.20 by greg, Sat Jun 7 05:09:46 2025 UTC

# Line 4 | Line 4
4   * Header file for rcontrib modules
5   */
6  
7 + #include "platform.h"
8 + #include "rtprocess.h"
9   #include "ray.h"
10   #include "func.h"
11   #include "lookup.h"
# Line 39 | Line 41 | extern long            waitflush;      /* how long until next flush *
41   extern RNUMBER          lastray;        /* last ray number sent */
42   extern RNUMBER          lastdone;       /* last ray processed */
43  
44 < typedef double          DCOLOR[3];      /* double-precision color */
44 > extern int              report_intvl;   /* reporting interval (seconds) */
45  
46 + typedef double          DCOLORV;        /* double-precision color type */
47 +
48   /*
49   * The MODCONT structure is used to accumulate ray contributions
50   * for a particular modifier, which may be subdivided into bins
# Line 48 | Line 52 | typedef double         DCOLOR[3];      /* double-precision color *
52   * be replaced with the modifier name.  If outspec contains a %d in it,
53   * this will be used to create one output file per bin, otherwise all bins
54   * will be written to the same file, in order.  If the global outfmt
55 < * is 'c', then a 4-byte RGBE pixel will be output for each bin value
56 < * and the file will conform to a RADIANCE image if xres & yres are set.
55 > * is 'c', then a common-exponent pixel will be output for each bin value
56 > * and the file will conform to a RADIANCE picture if NCSAMP==3 and
57 > * xres and yres are set.
58   */
59   typedef struct {
60          const char      *outspec;       /* output file specification */
61          const char      *modname;       /* modifier name */
62 +        const char      *params;        /* parameter list */
63          EPNODE          *binv;          /* bin value expression */
64 +        int             bin0;           /* starting bin offset */
65          int             nbins;          /* number of contribution bins */
66 <        DCOLOR          cbin[1];        /* contribution bins (extends struct) */
66 >        DCOLORV         cbin[1];        /* contribution bins (extends struct) */
67   } MODCONT;                      /* modifier contribution */
68  
69 + #define DCOLORSIZ       (sizeof(DCOLORV)*NCSAMP)
70 + #define mcsize(nb)      (sizeof(MODCONT)-sizeof(DCOLORV)+(nb)*DCOLORSIZ)
71 + #define mcbin(mp,bi)    ((mp)->cbin + (bi)*NCSAMP)
72 +
73   extern LUTAB            modconttab;     /* modifier contribution table */
74  
75   /*
# Line 75 | Line 86 | typedef struct {
86   extern LUTAB            ofiletab;       /* output stream table */
87  
88   #ifndef MAXPROCESS
89 < #ifdef _WIN32
89 > #if defined(_WIN32) || defined(_WIN64)
90   #define MAXPROCESS      1
91   #else
92   #define MAXPROCESS      128
93   #endif
94   #endif
95  
96 < #ifndef MAXMODLIST
86 < #define MAXMODLIST      2048            /* maximum modifiers we'll track */
87 < #endif
88 <
89 < extern const char       *modname[MAXMODLIST];   /* ordered modifier name list */
96 > extern char             **modname;              /* ordered modifier name list */
97   extern int              nmods;                  /* number of modifiers */
98 + extern int              modasiz;                /* allocated modifier array size */
99  
100   extern char             RCCONTEXT[];            /* special evaluation context */
101  
94 extern char             *formstr(int f);        /* return format identifier */
95
102   extern void             process_rcontrib(void); /* trace ray contributions */
103  
104   extern STREAMOUT *      getostream(const char *ospec, const char *mname,
# Line 102 | Line 108 | extern void            mod_output(MODCONT *mp);
108   extern void             end_record(void);
109  
110   extern MODCONT          *addmodifier(char *modn, char *outf,
111 <                                                char *binv, int bincnt);
111 >                                        char *prms, char *binv, int bincnt);
112   extern void             addmodfile(char *fname, char *outf,
113 <                                                char *binv, int bincnt);
113 >                                        char *prms, char *binv, int bincnt);
114  
115   extern void             reload_output(void);
116   extern void             recover_output(void);
# Line 112 | Line 118 | extern void            recover_output(void);
118   extern int              getvec(FVECT vec);
119  
120   extern int              in_rchild(void);
121 < extern void             end_children(void);
121 > extern void             end_children(int immed);
122  
123   extern void             put_zero_record(int ndx);
124  
125 + extern int              morays(void);           /* reached end of input? */
126 +
127   extern void             parental_loop(void);    /* controlling process */
128 +
129 + extern void             feeder_loop(void);      /* feeder process */
130  
131   extern void             rcontrib(void);         /* main calculation loop */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines