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)] |
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++) |