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

Comparing ray/src/util/rttree_reduce.c (file contents):
Revision 2.3 by greg, Wed Jun 1 16:51:03 2011 UTC vs.
Revision 2.4 by greg, Fri Jun 3 18:12:58 2011 UTC

# Line 17 | Line 17 | float  *datarr;                /* our loaded BSDF data array */
17   int     ttrank = 4;             /* tensor tree rank */
18   int     log2g = 4;              /* log2 of grid resolution */
19   int     infmt = 'a';            /* input format ('a','f','d') */
20 < double  pctcull = 99.;          /* target culling percentile */
20 > double  pctcull = 95.;          /* target culling percentile */
21  
22   #define dval3(ix,ox,oy)         datarr[((((ix)<<log2g)+(ox))<<log2g)+(oy)]
23   #define dval4(ix,iy,ox,oy)      datarr[((((((ix)<<log2g)+(iy))<<log2g)+(ox))<<log2g)+(oy)]
# Line 260 | Line 260 | load_data()
260                  error(SYSTEM, "out of memory in load_data");
261          if (ttrank == 3) {
262                  int     ix, ox;
263 <                for (ix = 0; ix < 1<<log2g; ix++)
263 >                for (ix = 0; ix < 1<<(log2g-1); ix++)
264                          for (ox = 0; ox < 1<<log2g; ox++)
265                                  (*readf)(datarr+((((ix)<<log2g)+(ox))<<log2g),
266 <                                                1<<(log2g-1));
266 >                                                1<<log2g);
267          } else /* ttrank == 4 */ {
268                  int     ix, iy, ox;
269                  for (ix = 0; ix < 1<<log2g; ix++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines