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;
112 newboxp = (
g2int *)calloc(*ndg,
sizeof(
g2int));
128 *(
unsigned char *)cfeed = (
char) ifeed;
133 for (l = 1; l <= i__1; ++l) {
140 for (j = 1; j <= 31; ++j) {
141 ntotbt[j - 1] = 999999999;
146 iorigb = (*ibit + *jbit + *kbit) * *lx;
151 ntotbt[*kbit - 1] = iorigb;
167 i__1 = 30, i__2 = *kbit - 1;
169 for (j = (i__1 < i__2) ? i__1 : i__2; j >= 2; --j) {
177 for (l = 1; l <= i__1; ++l) {
179 if (nov[l] < ibxx2[j]) {
186 m = (nov[l] - 1) / (ibxx2[j] - 1) + 1;
192 novl = (nov[l] + m - 1) / m;
197 if (novl < ibxx2[j]) {
210 newbox[l - 1] = m - 1;
211 newboxt = newboxt + m - 1;
218 ntotbt[j - 1] = (*ibit + *jbit) * (*lx + newboxt) + j * (*lx +
221 if (ntotbt[j - 1] >= ntotpr) {
233 for (l = 1; l <= i__1; ++l) {
234 newboxp[l - 1] = newbox[l - 1];
266 pimp = (iorigb - ntotbt[jj - 1]) / (
float) iorigb * 100.f;
286 lxnkp = *lx + newboxtp;
306 ibxx2m1 = ibxx2[jj] - 1;
309 for (l = *lx; l >= 1; --l) {
316 if (newboxp[l - 1] * (ibxx2m1 + *novref) + *novref > nov[l] + *
321 movmin = (nov[l] - newboxp[l - 1] * *novref) / newboxp[l - 1];
333 if (newboxp[l - 1] > 0) {
334 if ((movmin + *novref) * newboxp[l - 1] + *novref <= nov[l] +
335 *novref && (movmin + *novref) * (newboxp[l - 1] + 1)
336 >= nov[l] + *novref) {
354 i__1 = newboxp[l - 1] + 1;
355 for (j = 1; j <= i__1; ++j) {
357 move = (movmin < left) ? movmin : left;
363 left -= move + *novref;
369 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 ...