95 static g2int ifeed = 12;
101 static g2int newboxtp, j, l, m, jj, lxn, left;
103 static g2int move, novl;
104 static char cfeed[1];
106 static g2int lxnkp, iorigb, ibxx2m1, movmin,
107 ntotbt[31], ntotpr, newboxt;
108 g2int *newbox, *newboxp;
111 newbox = (
g2int *)calloc(*ndg,
sizeof(
g2int));
112 newboxp = (
g2int *)calloc(*ndg,
sizeof(
g2int));
129 *(
unsigned char *)cfeed = (
char)ifeed;
134 for (l = 1; l <= i__1; ++l)
142 for (j = 1; j <= 31; ++j)
144 ntotbt[j - 1] = 999999999;
149 iorigb = (*ibit + *jbit + *kbit) * *lx;
154 ntotbt[*kbit - 1] = iorigb;
170 i__1 = 30, i__2 = *kbit - 1;
172 for (j = (i__1 < i__2) ? i__1 : i__2; j >= 2; --j)
181 for (l = 1; l <= i__1; ++l)
184 if (nov[l] < ibxx2[j])
194 m = (nov[l] - 1) / (ibxx2[j] - 1) + 1;
200 novl = (nov[l] + m - 1) / m;
221 newbox[l - 1] = m - 1;
222 newboxt = newboxt + m - 1;
228 ntotbt[j - 1] = (*ibit + *jbit) * (*lx + newboxt) + j * (*lx +
231 if (ntotbt[j - 1] >= ntotpr)
246 for (l = 1; l <= i__1; ++l)
248 newboxp[l - 1] = newbox[l - 1];
280 pimp = (iorigb - ntotbt[jj - 1]) / (
float)iorigb * 100.f;
301 lxnkp = *lx + newboxtp;
322 ibxx2m1 = ibxx2[jj] - 1;
325 for (l = *lx; l >= 1; --l)
333 if (newboxp[l - 1] * (ibxx2m1 + *novref) + *novref > nov[l] + *novref)
338 movmin = (nov[l] - newboxp[l - 1] * *novref) / newboxp[l - 1];
352 if (newboxp[l - 1] > 0)
354 if ((movmin + *novref) * newboxp[l - 1] + *novref <= nov[l] +
356 (movmin + *novref) * (newboxp[l - 1] + 1) >= nov[l] + *novref)
376 i__1 = newboxp[l - 1] + 1;
377 for (j = 1; j <= i__1; ++j)
380 move = (movmin < left) ? movmin : left;
386 left -= move + *novref;
392 if (left != -(*novref))
int reduce(g2int *kfildo, g2int *jmin, g2int *jmax, g2int *lbit, g2int *nov, g2int *lx, g2int *ndg, g2int *ibit, g2int *jbit, g2int *kbit, g2int *novref, g2int *ibxx2, g2int *ier)
Determines whether the number of groups should be increased in order to reduce the size of the large ...